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)
This commit is contained in:
parent
9bbff22d96
commit
3688bae75f
|
@ -137,7 +137,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
# needed when using #include <unordered_map>, 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.
|
||||
|
|
|
@ -4,18 +4,7 @@
|
|||
#ifndef FCTSYS_H_
|
||||
#define FCTSYS_H_
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include <wx/wxprec.h>
|
||||
|
||||
#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 <wx/wx.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @note This appears to already be included in the OSX build of wxWidgets.
|
||||
|
|
Loading…
Reference in New Issue