Netbeans C/C++ 7.2 -std=C++11 无法被 gcc v4.6 或更低版本识别 [英] Netbeans C/C++ 7.2 -std=C++11 not recognized by gcc v4.6 or lower

查看:24
本文介绍了Netbeans C/C++ 7.2 -std=C++11 无法被 gcc v4.6 或更低版本识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 v7 发布后立即将 Eclipse 留给 NetBeans 进行 C/C++ 开发,这似乎是一个明智的选择,除了当前最新版本中的 -std=C++11 标志,即 7.2,不被 gcc 4.6 (-std=C++0x) 或之前的版本识别.由于 Ubuntu 12.04 附带了 gcc 4.6(就 11 个功能而言,它应该足以用于我的工作),并且全新安装 gcc 4.7 可能会导致系统维护的复杂性(嗯……我是一个人非常简单,整洁干净),有什么解决办法吗?

I left Eclipse to NetBeans for C/C++ development right after release v7 and it all seems a wise choice except that -std=C++11 flag in the current latest release, namely 7.2, is not recognized by gcc 4.6 (-std=C++0x) or the previous. Since Ubuntu 12.04 ships with gcc 4.6 (which should be fair enough to use for my jobs in term of 11 features) and a fresh installation of gcc 4.7 might bring about complexity in maintenance of the system (well...I'm a person extremely simple, neat and clean), is there any work around?

推荐答案

使用 NetBeans 中的C++ 标准"选项不起作用.我的解决方案是手动完成.添加:

Using the "C++ standard" option from NetBeans does not work. My solution is to do it manually. Add:

-std=c++0x

到项目">设置">构建">C++编译器"中的附加选项"

To the "Additional Options" in the Project > Settings > Build > C++ Compiler

这篇关于Netbeans C/C++ 7.2 -std=C++11 无法被 gcc v4.6 或更低版本识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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