Netbeans C/C++ 7.2 -std=C++11 not recognized by gcc v4.6 or lower
-
25-06-2021 - |
Question
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?
Solution
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow