我正在学习C++,我需要在C++11的Geany中正确设置我的编译和构建命令。
我以为我把它们都弄对了,但在使用auto时,我收到了以下错误:
warning: ‘auto’ will change meaning in C++0x; please remove it [-Wc++0x-compat]下面是我当前的set build命令:
Compile: g++ -Wall -c "%f"
Build: g++ -Wall -o "%e" "%f"
Execute: "./%e"为了正确编译、构建和执行C++11程序,我需要将这些设置为什么?
发布于 2013-01-28 12:58:02
正如注释中所指出的,您需要添加标志-std=c++0x。您可以在" build“-> "Set build commands”中设置它,然后修改以下框中的命令:
编译:
g++ -Wall -std=c++0x -c "%f"内部版本:
g++ -Wall -std=c++0x -o "%e" "%f"https://stackoverflow.com/questions/14544325
复制相似问题