On 1/10/2019 5:00 AM, Tempelaar E. (Erik) wrote:
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

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?


I don't have an answer for this but ...

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?

Never depend on defaults set the base system you want to support. You can do that as you've indicated by the Makefile or in a preliminary header that is included by all sources.


Here's a (subset) of possible updates for my colleague's setup, my guess is 
that the change is in one of these:

mingw-w64-i686-ca-certificates 20170211-2 -> 20180409-1
mingw-w64-i686-crt-git 6.0.0.5176.1fd1a585-1 -> 7.0.0.5285.7b2baaf8-1
mingw-w64-i686-expat 2.2.5-1 -> 2.2.6-1
mingw-w64-i686-gcc 7.3.0-2 -> 7.4.0-1
mingw-w64-i686-gcc-libs 7.3.0-2 -> 7.4.0-1
mingw-w64-i686-gdb 8.1-3 -> 8.2.1-1
mingw-w64-i686-gettext 0.19.8.1-4 -> 0.19.8.1-7
mingw-w64-i686-headers-git 6.0.0.5176.1fd1a585-1 -> 7.0.0.5285.7b2baaf8-1
mingw-w64-i686-libwinpthread-git 6.0.0.5174.9726fb77-1 -> 7.0.0.5273.3e5acf5d-1
mingw-w64-i686-ncurses 6.1.20180526-1 -> 6.1.20180908-1
mingw-w64-i686-openssl 1.0.2.o-1 -> 1.1.1.a-1
mingw-w64-i686-p11-kit 0.23.12-1 -> 0.23.14-1
mingw-w64-i686-python3 3.7.0-10 -> 3.7.2-1
mingw-w64-i686-sqlite3 3.24.0-1 -> 3.26.0-1
mingw-w64-i686-tcl 8.6.8-1 -> 8.6.9-2
mingw-w64-i686-tk 8.6.8-1 -> 8.6.9.1-1
mingw-w64-i686-winpthreads-git 6.0.0.5174.9726fb77-1 -> 7.0.0.5273.3e5acf5d-1
mingw-w64-i686-zlib 1.2.11-3 -> 1.2.11-5

Please advise, I would like to know how this is supposed to work for 
msys2/mingw32

My guess is the -crt-git package but I don't really know which one of these changed a default. It is a default and every seasoned developer would tell you not to depend on defaults. The defaults are set to aid the majority of cases and as Windows and MinGW progresses the defaults for _WIN32_WINNT are likely to change to indicate where the focus should be for this project.

--
Earnie


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to