Netbeans C/C++ 7.2 -std=C++11 not recognized by gcc v4.6 or lower

北战南征 提交于 2020-01-10 05:34:05

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/11921138/netbeans-c-c-7-2-std-c11-not-recognized-by-gcc-v4-6-or-lower

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!