需要在代码块中启用C ++ 11 [英] Need to enable C++11 in Codeblocks

查看:131
本文介绍了需要在代码块中启用C ++ 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在代码块16中启用C ++ 11。



几个教程说明,所有需要做的就是选择让g ++跟随C ++。 11 ISO C ++语言标准设置>编译器...>编译器设置>编译器标志中的 -std = c ++ 11 选项,但是在Windows中没有出现这样的选项我的编译器标志:





其他建议仅粘贴 -std = c ++ 11 放入其他编译器选项。但这不允许我构建代码,并在构建消息栏中显示: p>



我正在使用代码块16和GNU GCC编译器Windows 7附带它。

解决方案

您始终可以选择-std = c ++ 0x选项,但是另一种解决方案是安装更新的mingw版本,因为问题显然是编译器,而不是Code :: Blocks


I need to enable C++11 in Codeblocks 16.

Several tutorials explain that all one needs to do is select the "Have g++ follow the C++11 ISO C++ language standard -std=c++11 option in "Settings > Compiler... > Compiler Settings > Compiler Flags", however such an option does not appear in my Compiler Flags:

Others suggest just pasting -std=c++11 into "Other compiler options". However this doesn't allow me to build my code and shows this in the "Build Messages" bar:

I am using Codeblocks 16, with the GNU GCC Compiler that comes with it on Windows 7.

解决方案

You could always just select the -std=c++0x option, but another solution is to install more recent mingw version since the problem is obviously the compiler, not Code::Blocks

这篇关于需要在代码块中启用C ++ 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆