无法在 WXWIDGETS Windows 10 中编译调试
failed to compile debug in wxwidgets windows 10
我想跨多个平台开发应用程序。我是wxwidgets的新手。我想编译调试,但它会产生错误。这是我的命令结果。请帮助我。到目前为止,我已经使用 WPF MVVM C# 完成了应用程序,但它只能在 Windows 环境中运行。所以我正在改用 C++,知道它可以在任何环境中编译。请帮助我。
C:wxWidgets-3.0.2buildmsw>mingw32-make SHELL=CMD.exe -f makefile.gcc USE_XRC=1 BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"
if not exist ....libgcc_dllmswud mkdir ....libgcc_dllmswud
g++ -c -o gcc_mswuddllmonodll_any.o -g -O0 -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE -I....libgcc_dllmswud -I....include -W -Wall -DWXBUILDING -I....srctifflibtiff -I....srcjpeg -I....srcpng -I....srczlib -I....srcregex -I....srcexpatlib -I....srcstcscintillainclude -I....srcstcscintillalexlib -I....srcstcscintillasrc -D__WX__ -DSCI_LEXER -DLINK_LEXERS -DwxUSE_BASE=1 -DWXMAKINGDLL -Wno-ctor-dtor-privacy -fno-keep-inline-dllexport -MTgcc_mswuddllmonodll_any.o -MFgcc_mswuddllmonodll_any.o.d -MD -MP ../../src/common/any.cpp
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/5.1.0/include/c++/type_traits:35:0,
from ....include/wx/strvararg.h:25,
from ....include/wx/string.h:46,
from ....include/wx/any.h:19,
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 standard. This support is currently experimental, and must be enabled with the -std=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 not 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 scope
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:6428: recipe for target 'gcc_mswuddllmonodll_any.o' failed
mingw32-make: *** [gcc_mswuddllmonodll_any.o] Error 1
C:wxWidgets-3.0.2buildmsw>
您是否一直按照通常的构建说明进行操作而没有任何更改?一些非常奇怪的事情正在发生,因为HAVE_TYPE_TRAITS
以某种方式为您定义(查看文件中的条件wx/strvararg.h
错误指向您的行上方(,但未修改的 wxWidgets 源不应该是这种情况,因为它仅在使用 C++11 时定义,即当__cplusplus >= 201103L
时,但您使用的编译器 (g++ 5.1( 默认情况下__cplusplus
定义为199711L
。
如果您尝试以不同的方式构建它,例如使用 configure,则必须在再次构建之前清理所有内容,即只需销毁整个源目录并重新展开存档(如果您已下载它(或git clean -fdx
如果您克隆了 Git 存储库。
您需要将C++标准设置为 11。将-std=c++11
添加到编译命令行(我没有粘贴整行,因为它很长。
mingw32-make SHELL=CMD.exe -f makefile.gcc -std=c++11 USE_XRC=1 BUILD=debug U...
相关文章:
- 为什么使用__LINE_的代码在发布模式下在MSVC下编译,而不是在调试模式下
- 即使使用调试编译标志,表达式也是"optimized out"
- 调试编译的服务器在数据库打开时崩溃
- 如何在调试中使用Visual Studio正确编译WebRTC?
- 使用Qt Creator在调试模式下编译一段代码
- 在调试配置中编译工作正常,但发布会给出链接错误
- 如何调试无法编译的Arduino程序?
- 在调试模式下编译时qrc_resource.cpp错误
- Boost tread 代码在 VC++ 下编译,但不在 GCC 下编译:如何获得更好的调试信息
- 如何调试编译 c++ 代码的 bazel?
- 在Visual Studio 2017上无法使用调试模式x64进行OpenCV3.2编译
- 无法在 WXWIDGETS Windows 10 中编译调试
- Valgrind 标志,调试与发布编译
- 在没有 -g 选项的情况下编译,但我想获得更详细的调试信息
- C/C++ 远程编译,使用 ELF 的本地调试会话(嵌入式,Cortex-M)
- lower_bound()函数不能在调试模式下编译
- Android Studio,CMake.如何在编译时打印调试消息
- 一般来说,使用Qt Creator,是什么导致程序在调试模式下编译时正确运行,但在发布模式下崩溃
- Visual Studio抱怨在编译调试时找不到.exe
- 可视化 如何配置 VS Code 以编译/调试C++