On Fri, 23 Dec 2022, Roger Pack wrote: > Ran into this. > According to > https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170 > "The preprocessor macros WINVER and _WIN32_WINNT specify the minimum > operating system version your code supports." > > Anyway, setting this value to default to windows 10 caught me > recently, suddenly compiling gnutls doesn't work for windows 7 anymore > It uses Gnulib's gettimeofday.c internally, which links against the > windows 8' GetSystemTimePreciseAsFileTime if _WIN32_WINNT is set high > enough.
I recently discovered that llvm's libc++ has something similar. MSYS2 recently bumped their default _WIN32_WINNT to Windows 8.1, and the libc++ built after that no longer worked on Windows 7. I was of the understanding that that macro was intended to be set by project code, and just controlled what APIs were made available by the headers, and the project code could simply not call anything from a newer version. But it seems that some projects treat it instead as telling *them* what APIs they can call, and that results in it being a minimum supported OS version. I didn't know MS explicitly called it out as such in a doc somewhere. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
