Closed k15tfu closed 4 years ago
AFAIR, sdkddkver.h
is not universally available, so we can't include it.
In any case, defining macros like _WIN32_WINNT
in command line to non-numeric values is incorrect exactly for the reason you outlined - the code may check the macros without including any headers and because macros like _WIN32_WINNT_VISTA
are not defined such checks will fail. You should define _WIN32_WINNT=0x0600
in the command line.
Hi!
I'm defining _WIN32_WINNT to _WIN32_WINNT_VISTA in my project, but then I get the following error from boost:
I found that this constant should be defined here:
but unfortunately it evaluates to false because _WIN32_WINNT_VISTA is not defined at this point. Adding #include sdkddkver.h before comparing _WIN32_WINNT macro fixes this problem.
I think the right place for this is boost/winapi/config.hpp because that's where BOOST_USE_WINAPI_VERSION is defined.