首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装wxwidget 2时遇到麻烦

安装wxwidget 2时遇到麻烦
EN

Stack Overflow用户
提问于 2015-11-23 03:11:27
回答 1查看 1.6K关注 0票数 2

如果您看到了我的安装wxwidget 1时遇到麻烦,如果您再次遇到问题,您必须查看这个问题并阅读答案,在删除无用的gcc路径之后,我在控制台中得到了以下内容:

代码语言:javascript
复制
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>

这是命令

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-23 17:20:03

不幸的是,wxWidgets 3.0.2在g++ 5.1之前就已经发布了(甚至在g++ 4.9之前发布,或者接近于g++ 4.9),所以在使用C++98模式时,它不会使用C++98模式进行开箱即用的编译。这个问题已经解决了,但没有正式发布,所以您有两个选择:

  1. 这个修复应用于您的源。如果你不知道该怎么做,你最好的办法就是从git上获取WX_3_0_BRANCH的最新消息。
  2. 通过将C++11附加到make命令行,在CXXFLAGS=-std=gnu++11模式下构建。如果这样做,请记住在以后使用wxWidgets构建应用程序时使用相同的标志!
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33863195

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档