Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized command line option "-std=c++11" c++ in Netbeans 7.2

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.

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

like image 601
Darren Hoehna Avatar asked Sep 11 '12 20:09

Darren Hoehna


1 Answers

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

like image 62
不辞长做岭南人 Avatar answered Nov 01 '22 15:11

不辞长做岭南人