From 3688bae75fbc2c1327544b2584df1059d138fd6c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 14 Nov 2012 21:07:09 +0100 Subject: [PATCH] Fix compil issue under MinGW: for an obscure reason the option -std=c++0x creates error in wxWidget code: some functions used in wxWidgets ( like _strdup and few other) are not defined when this option is set. but the equivalent option -std=gnu++0x works fine so it is used under mingw instead of -std=c++0x. (Under Linux/OSX the option -std=c++0x is used) --- CMakeLists.txt | 6 +++++- include/fctsys.h | 11 ----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fb8ab5e6f..be79c075a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,7 +137,11 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_BUILD_TYPE STREQUAL Debug) # needed when using #include , or std::unique_ptr which replaces std::auto_ptr - set(CMAKE_CXX_FLAGS "-std=c++0x") + if(WIN32) + set(CMAKE_CXX_FLAGS "-std=gnu++0x") + else(WIN32) + set(CMAKE_CXX_FLAGS "-std=c++0x") + endif(WIN32) if(WIN32) # under Windows/mingw, -fPIC option is enabled by default # Set default flags for Release build. diff --git a/include/fctsys.h b/include/fctsys.h index 764ab50825..2d07a11413 100644 --- a/include/fctsys.h +++ b/include/fctsys.h @@ -4,18 +4,7 @@ #ifndef FCTSYS_H_ #define FCTSYS_H_ -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWidgetss headers -#ifndef WX_PRECOMP #include -#endif /** * @note This appears to already be included in the OSX build of wxWidgets.