C ++ 11 Geany设置 [英] C++11 Geany setup
本文介绍了C ++ 11 Geany设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习C ++,我需要在Geany for C ++ 11中正确设置编译和构建命令.
I am learning C++ and I need to properly setup my compile and build commands in Geany for C++11.
我以为我的设置正确,但是使用 auto
时,出现以下错误:
I thought I had them correct, but when using auto
, I receive the following error:
warning: ‘auto’ will change meaning in C++0x; please remove it [-Wc++0x-compat]
这是我当前设置的构建命令:
Here are my current set build commands:
Compile: g++ -Wall -c "%f"
Build: g++ -Wall -o "%e" "%f"
Execute: "./%e"
为了正确地编译,构建和执行C ++ 11程序,我需要将它们设置为什么?
What do I need to set these to in order to properly compile, build, and execute a C++11 program?
推荐答案
正如注释中指出的那样,您需要添加标志 -std = c ++ 0x
.您可以在构建"->设置构建命令"中进行设置,然后在以下框中修改命令:
As what is pointed out in the comments, you need to add the flag -std=c++0x
. You can set it in the "Build" -> "Set build commands", then modify the commands in following boxs:
编译:
g++ -Wall -std=c++0x -c "%f"
内部版本:
g++ -Wall -std=c++0x -o "%e" "%f"
这篇关于C ++ 11 Geany设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文