如何将-std = c ++ 11添加到NetBeans IDE中的编译器选项? [英] how do I add -std=c++11 to the compiler options in my NetBeans IDE?
问题描述
Netbeans给我以下错误:
错误此文件需要编译器和库支持ISO C ++ 2011标准。此支持目前是实验性的,必须
启用-std = c ++ 11或-std = gnu ++ 11编译器选项。
我不知道如何解决这个问题。 ?
首先:打开项目属性,然后Code Assistance-> C ++ Compiler。在C ++ Standard中选择C ++ 11。 / p>
第二:你必须在项目中启用C ++ 11。如果你从Netbeans内部创建c ++项目,在项目属性 - > Build-> C ++ Compiler中,将C ++标准设置为C ++ 11,然后单击其他选项中的点,并确保启用了-std = c ++ 11选项。
如果导入具有外部makefile的项目,必须在makefile中手动添加此选项。
Netbeans give me the following 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.
Im not sure how to fix this. any help?
First: Open project properties and then Code Assistance->C++ Compiler. In C++ Standard select C++11.
Second: you must enable C++11 in your project. If you created the c++ project from inside Netbeans, in project properties->Build->C++ Compiler, you must set C++ standard to C++11, and then click on dots in Additional Options and ensure that the -std=c++11 option is enabled.
If you imported the project with external makefile, you must add manually this option in the makefile.
这篇关于如何将-std = c ++ 11添加到NetBeans IDE中的编译器选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!