diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 362ac37a59..9a5e832dcb 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -47,8 +47,14 @@ include(statemachine/statemachine.pri) include(mimetypes/mimetypes.pri) include(xml/xml.pri) -# otherwise mingw headers do not declare common functions like putenv -mingw: CONFIG -= strict_c++ +win32 { + mingw { + # otherwise mingw headers do not declare common functions like putenv + CONFIG -= strict_c++ + # Override MinGW's definition in _mingw.h + DEFINES += WINVER=0x600 _WIN32_WINNT=0x0600 + } +} mac|darwin { !ios { diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h index 8ac3c2135d..000da29fb8 100644 --- a/src/corelib/global/qt_windows.h +++ b/src/corelib/global/qt_windows.h @@ -48,10 +48,10 @@ #if defined(Q_CC_MINGW) // mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation # ifndef WINVER -# define WINVER 0x501 +# define WINVER 0x600 # endif # ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 +# define _WIN32_WINNT 0x600 # endif #endif