如果您在安装wxwidgets 1时遇到麻烦,并且再次遇到问题,则必须查看此问题并阅读答案让我们开始,删除无用的gcc路径后,我在控制台中得到了此信息:
from ../../src/common/any.cpp:18:
C:/TDM-GCC-32/lib/gcc/mingw32/5.1.0/include/c++/bits/c++0x_warning.h:32:2: error
: #error This file requires compiler and library support for the ISO C++ 2011 st
andard. This support is currently experimental, and must be enabled with the -st
d=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
In file included from ..\..\include/wx/string.h:46:0,
from ..\..\include/wx/any.h:19,
from ../../src/common/any.cpp:18:
..\..\include/wx/strvararg.h:350:18: error: 'is_enum' in namespace 'std' does no
t name a template type
typedef std::is_enum<T> is_enum;
^
..\..\include/wx/strvararg.h:354:54: error: 'is_enum' was not declared in this s
cope
enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
^
..\..\include/wx/strvararg.h:354:68: error: template argument 1 is invalid
enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
^
makefile.gcc:11712: recipe for target 'gcc_mswud\baselib_any.o' failed
mingw32-make: *** [gcc_mswud\baselib_any.o] Error 1
C:\wxWidgets-3.0.2\build\msw>
是命令
cd %WXWIN%\build\msw
mingw32-make -f makefile.gcc clean
>>>mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1 WXUNIV=0<<<
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=0 UNICODE=1 WXUNIV=0
不幸的是,wxWidgets 3.0.2在g ++ 5.1之前(甚至在g ++ 4.9之前,或者可能接近于g ++ 4.9)发布,因此使用它时,它并没有在C ++ 98模式下随其进行编译。此问题已得到修复,但尚未在正式版本中得到修复,因此您有2个选择:
WX_3_0_BRANCH
从git中获取最新的资源。CXXFLAGS=-std=gnu++11
到make命令行以C ++ 11模式进行构建。如果这样做,请记住在以后使用wxWidgets构建应用程序时要使用相同的标志!本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句