|
From: Chris A. <ro...@gm...> - 2014-07-07 07:52:03
|
Minimal test-case: #define _WIN32_WINNT 0x0500 #define NTDDI_VERSION 0x05000000 #include <windows.h> I have a WinXP virtual machine on which I just installed a fresh mingw and msys (today), in order to try to cross-compile stuff for Windows. Failing with the subject error, because in sdkddkver.h are the following lines: # if _WIN32_WINNT != OSVER(NTDDI_VERSION) # error The _WIN32_WINNT value does not match NTDDI_VERSION # endif According to 'gcc -dM -E' on the above code, OSVER is defined thus: #define OSVER(ver) ((ver) & OSVERSION_MASK) #define OSVERSION_MASK 0xFFFF0000 I think possibly the right macro to use here is not OSVER, but WINNTVER: #define WINNTVER(ver) ((ver) / 0x00010000) With this change, the test case and the original code appear to compile successfully. I'm not sure it's right, though; advice? Chris Angelico |