在 2019/1/10 18:00, Tempelaar E. (Erik) 写道: > I recently reconfigured a build environment for a mingw-built application but > I ran into issues > on Windows 10 caused by a #define _WIN32_WINNT in > C:\msys64\mingw32\i686-w64-mingw32\include\_mingw.h > > In my installation it targets WINNT 0x0601 > > #ifndef _WIN32_WINNT > #define _WIN32_WINNT 0x601 > #endif > > My colleague's setup targets 0x0502. > > In my understanding 0x0502 is still the default: > https://mingw-w64.org/doku.php/configure > https://github.com/mirror/mingw-w64/blob/d72c4fe62568a216d52dca47ca8bace4e220d84f/mingw-w64-headers/configure.ac#L156 >
MSYS2 defines it to `0x601` [*]. [*] https://github.com/Alexpux/MINGW-packages/blob/5c49c82a69fee59b7f6baed79e89a2d779de1727/mingw-w64-headers-git/PKGBUILD#L59 > I installed msys2-x86_64-20161025.exe and updated via pacman and installed > i.e. base-devel and pacman -S mingw-w64-i686-gcc. > > How could I have ended up with 0x0601? > > What's the recommended way to control this and prevent issues like this? > Store an archive of msys2/mingw32 somewhere? > Add -D_WIN32_WINNT=0x0502 to our makefile? > `-D_WIN32_WINNT=0x0502` is usually expected to reside in `CPPFLAGS` if you are using automake. Otherwise, your colleagues might have their own conventions for such macros. -- Best regards, LH_Mouse _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public