When gcc was compiled with crtdll config then it links binaries with -lcrtdll instead of -lmsvcrt and predefines macro __CRTDLL__.
So when __MSVCRT_VERSION__ was not manually set and gcc is not going to use -lmsvcrt then set __MSVCRT_VERSION__ to 0x00 to indicate that msvcrt.dll is not used. --- mingw-w64-headers/crt/_mingw.h.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in index 83fa2da8041c..0ef7ae6ea707 100644 --- a/mingw-w64-headers/crt/_mingw.h.in +++ b/mingw-w64-headers/crt/_mingw.h.in @@ -221,10 +221,12 @@ limitations in handling dllimport attribute. */ #ifndef __MSVCRT_VERSION__ /* High byte is the major version, low byte is the minor. */ -# ifndef _UCRT -# define __MSVCRT_VERSION__ @DEFAULT_MSVCRT_VERSION@ -# else +# if defined(__CRTDLL__) +# define __MSVCRT_VERSION__ 0x00 +# elif defined(_UCRT) # define __MSVCRT_VERSION__ 0xE00 +# else +# define __MSVCRT_VERSION__ @DEFAULT_MSVCRT_VERSION@ # endif #endif -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public