c++ - 尝试编译我的wxWidgets程序时出现 “is_enum not declared in this scope”错误

标签 c++ compiler-errors codeblocks wxwidgets

当我尝试编译时,G++编译器显示以下错误:

C:\wx\include\wx\strvararg.h|350|error: 'is_enum' in namespace 'std' does not name a template type|
C:\wx\include\wx\strvararg.h|354|error: 'is_enum' was not declared in this scope|
C:\wx\include\wx\strvararg.h|354|error: template argument 1 is invalid|

我为此使用Code::Blocks,并使用wxWidgets的非整体DLL构建。

谢谢你的帮助!

最佳答案

如Brian所述,您应该启用C++ 11。有两种方法可以执行此操作,如您所见What are the differences between -std=c++11 and -std=gnu++11?

我记得,在编译整个wxWidgets库时,我使用了-std = gnu++ 11,没有任何问题。

关于c++ - 尝试编译我的wxWidgets程序时出现 “is_enum not declared in this scope”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37311147/

相关文章:

c++ - 为什么自定义循环更快?糟糕的编译器?不安全的自定义代码?运气?(幸运缓存命中)

c++ - 如何分离在 C++ 中执行的 Java 应用程序的标准输入/标准输出/标准错误流

linker - ifort在Linux上的编译器选项

c - 对 conj、conjf、conjl 的 undefined reference

linux - 如何使用 Code::Blocks 在 linux 上与 mingw 交叉编译?

c++ - CUDA 编译器 (nvcc) 宏

c++ - ZeroMQ 始终发送和获取 1 个字节(使用 cppzmq 绑定(bind))

c++ - C++中引用的无效初始化

c++ - 警告: 'LPEVENT CItem::m_pkExpireEvent' and warning:format '%d' expects type 'int' , but argument 3 has type 'double'

c++ - SHFILEOPSTRUCT 不确定如何加倍转义字符串