安装wxwidgets 2时出现问题
Trouble with installing wxwidgets 2
如果你看到我在安装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_mswudbaselib_any.o' failed
mingw32-make: *** [gcc_mswudbaselib_any.o] Error 1
C:wxWidgets-3.0.2buildmsw>
这是命令
cd %WXWIN%buildmsw
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模式下开箱即用地编译。这个问题从那以后就得到了解决,但没有在官方版本中得到解决,所以你有两个选择:
- 将此修复程序应用于您的源。如果你不确定如何做到这一点,你最好的办法就是从git中获取
WX_3_0_BRANCH
的最新来源 - 通过将
CXXFLAGS=-std=gnu++11
附加到make命令行,在C++11模式下进行构建。如果您这样做,请记住稍后使用wxWidgets构建应用程序时使用相同的标志
相关文章:
- 为"adjacent"变量赋值时出现问题
- 在Ubuntu 16.04上安装Cilk时出现问题
- 编译包含字符串的代码时遇到问题
- 在编译C++代码(具有dlib和opencv)到WASM时面临问题
- C++ 雷神库 - 使用资源加载器类时出现问题(不命名类型)
- 使用mongocxx驱动程序时包含头文件问题
- 在WSL:configure_file上对config_file的每次调用都失败:配置文件时出现问题
- 运行程序时出现问题
- 在决定是通过参考还是通过价值时,尺寸真的是一个问题吗
- 在java中解决这段代码时面临循环中的问题
- 当调用switch语句中的函数时(即使函数不包含循环),似乎是永不结束的循环的问题
- 编译要在英特尔Hyperscan中使用的.cc文件时出现问题
- 使用FFMPEG将RGB图像序列保存到.mp4时出现问题
- 在用于格式4的arm模拟器中实现功能时的一个问题
- 如何在C++向量中奇数元素前面加上值-1,我在使用insert函数时遇到了问题
- 编写时C++中的输入重定向问题
- 在类中使用随机生成器时出现性能问题
- 提升反序列化问题:运行时输入流错误 (c++)
- Clang 问题:构造时隐式类型转换
- XML Lite 解析问题 - 解析时忽略无效数据