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

查看:134
本文介绍了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可能会导致系统维护的复杂性(好吧...我是一个人

解决方案

使用NetBeans中的C ++标准选项不会工作。我的解决方案是手动完成。
Add:

  -std = c ++ 0x 

到Project> Settings> Build> C ++ Compiler中的Additional Options中。

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?

解决方案

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

-std=c++0x

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天全站免登陆