C++11 吉尼设置
C++11 Geany setup
我正在学习C++,我需要在 Geany 中正确设置 C++11 的编译和构建命令。
我以为我是正确的,但是在使用auto
时,我收到以下错误:
warning: ‘auto’ will change meaning in C++0x; please remove it [-Wc++0x-compat]
以下是我当前设置的构建命令:
Compile: g++ -Wall -c "%f"
Build: g++ -Wall -o "%e" "%f"
Execute: "./%e"
我需要设置这些内容才能正确编译、构建和执行 C++11 程序?
正如评论中指出的那样,您需要添加标志-std=c++0x
。您可以在"构建"->"设置构建命令"中进行设置,然后在以下框中修改命令:
编译:
g++ -Wall -std=c++0x -c "%f"
建:
g++ -Wall -std=c++0x -o "%e" "%f"
相关文章:
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- 在 c++11 中为 pthread 设置调度参数
- 使用C 11将数组设置为零
- 将C 11设置功能更改为带有转发的现代模板功能是一个好主意
- 是否可以在 C++11 中手动设置 istream 故障位
- 如何使用原子操作fetch_or或test_and_set在指针中设置一点,而在C 11中不使用Amberare_
- 如何使用C++11 std::thread设置堆叠大小
- 如何在本地设置和全局设置之间以C 11 RNG的初始状态进行切换
- 如何在 Windows 7 上的 CodeBlocks 中设置 C++11
- 无法使用std=C++11设置Eclipse Juno C++
- Eclipse Indexer 中的 C++11 设置与 git 冲突
- 在 C++11 中设置 std::线程优先级的便携式方法
- Eclipse Mars - 为C++项目设置默认设置(默认情况下设置 c++11)
- C++11设置了奇怪的行为
- emacs的c++ 11模式或设置
- c++, Mac OS X, Xcode 8: Compile Boost:设置部署目标为OS X 10.11
- c++ 11在公共函数中设置lambda
- 在Mac Capitan (OSX 10.11)上设置Qt 5.7 OpenGL版本
- C++程序检查 IBAN 帐号 - 如何为每个字符设置值:A=>10、B=>11、C=>12
- C++11 吉尼设置