Incorrect values for preprocessor variables WINVER and _WIN32_WINNT #795
Replies: 3 comments
-
I think you would need to manually set them to whatever value you wish based on your target system compatibility goals. They shouldn't be set based on the compiler's host OS version because you would then be unable to produce an executable for, let's say, Windows XP on a Windows 10 system. I use Open Watcom to build a non-trivial Windows GUI project, and I set them manually. The build server is Windows Server something-or-other, but the application runs on Windows 2000 through Windows 11 just fine (and looks alright too). |
Beta Was this translation helpful? Give feedback.
-
This is correct behavior, because we don't have SDK for each Version of Windows (something like Microsoft). |
Beta Was this translation helpful? Give feedback.
-
Another important thing is required minimal version of Windows subsystem. |
Beta Was this translation helpful? Give feedback.
-
I am compiling a GUI C project on a Windows 10 system running 64 bit version 21H2.
The preprocessor values for WINVER and _WIN32_WINNT are both 0x0400.
Because of this, various portions of WINUSER.H are not being processed, and a lot of the window message definitions for window 7, 8 and 10 are not defined.
Should WINUSER and _WIN32_WINNT have the values appropriate to the system compiling the code, or should I be using a command-line directive to set the value for WINUSER and _WIN32_WINNT.
Any suggestions would he helpful!
Thanks in advance!
David
Beta Was this translation helpful? Give feedback.
All reactions