错误“未在此范围内声明is_enum”。尝试编译我的wxWidgets程序时 [英] Error "is_enum not declared in this scope" when trying to compile my wxWidgets program
本文介绍了错误“未在此范围内声明is_enum”。尝试编译我的wxWidgets程序时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试编译时,G ++编译器显示以下错误:
C:\ \wx\include\wx\strvararg.h | 350 |错误:名称空间 std中的 is_enum未命名模板类型|
C:\wx\include\wx\strvararg.h | 354 |错误:未在此范围内声明 is_enum |
C:\wx\include\wx\strvararg.h | 354 |错误:模板参数1无效|
我正在为此使用Code :: Blocks,并使用wxWidgets的非整体DLL构建。 / p>
感谢您的帮助!
解决方案
正如Brian所指出的,您应该启用C ++ 11。有两种方法可以执行此操作,如您所见
我记得,在编译整个wxWidgets库时,我使用-std = gnu ++ 11且没有问题。
The G++ compiler shows the following errors when I try to compile:
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|
I am using Code::Blocks for this, with a non-monolithic DLL build of wxWidgets.
Thanks for any help!
解决方案
As Brian already indicated, you should enable C++11. There are two ways of doing this as you can see What are the differences between -std=c++11 and -std=gnu++11?.
As I remember, when compiling the whole wxWidgets library, I used -std=gnu++11 and had no problems.
这篇关于错误“未在此范围内声明is_enum”。尝试编译我的wxWidgets程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文