From 7477e94b2d456c93abb0cb65957b0e8f34a4f4a7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 13 Jan 2017 23:40:37 +0100 Subject: [PATCH] Fix build problems due to "missing" newer MSW APIs with MinGW 5.3.0 Set WINVER/_WIN32_WINNT ourselves before letting MinGW to set them to very low values corresponding to Windows 2000 on its own and preventing our code from seeing any later additions to the Windows API, such as AttachConsole() function used in src/msw/app.cpp. Closes #17677. --- include/wx/msw/gccpriv.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wx/msw/gccpriv.h b/include/wx/msw/gccpriv.h index b12efa9b2c..45b2c758f1 100644 --- a/include/wx/msw/gccpriv.h +++ b/include/wx/msw/gccpriv.h @@ -33,6 +33,14 @@ #endif #endif + /* + MinGW 5.3.0 (and presumably later) predefines _WIN32_WINNT and WINVER + in sdkddkver.h included from _mingw.h to very low (Windows 2000!) + values. We really want to predefine them ourselves instead, so do it + before including _mingw.h. + */ + #include "wx/msw/winver.h" + #include <_mingw.h> /*