无法识别的命令行选项“-std = c ++ 11” c ++在Netbeans 7.2中 [英] Unrecognized command line option "-std=c++11" c++ in Netbeans 7.2

查看:819
本文介绍了无法识别的命令行选项“-std = c ++ 11” c ++在Netbeans 7.2中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用C ++ 11。在通过互联网筛选后,我发现我所要做的是
右键单击我的项目 - >属性和C ++标准下选择c ++ 11.当我运行的程序与C ++ 11,我得到这个错误无法识别的命令行选项 -std = c ++ 11 。人们说的一个解决方案是添加 -g -std = c ++ 0x 在附加选项,但然后我得到无法识别的命令行选项 -std = c ++ 0x 。我已经下载了gcc-4.7.1.tar.gz,但我不知道该怎么办。

I am trying to use C++11. After sifting through the internet I found that all I have to do is right click on my project -> properties and under the "C++ standard" select c++ 11. When I run the program with C++ 11, I get this error "unrecognized command line option -std=c++11. One solution people have said is to add -g -std=c++0x in the "Additional Options" but then I get "unrecognized command line option -std=c++0x. I have downloaded gcc-4.7.1.tar.gz but I have no idea what to do with it.

有谁知道如何摆脱这个错误或知道如何使用c ++ 11编译net beans?

Does anyone know how to get rid of this error or know how to make net beans compile with c++11?

推荐答案

从gcc4.3开始支持c ++ 0x,而从gcc4.7

bump your gcc version to 4.7+. c++0x is supported since gcc4.3 while c++11 is supported since gcc4.7

这篇关于无法识别的命令行选项“-std = c ++ 11” c ++在Netbeans 7.2中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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