I am a beginner in C++ as well as a beginning Netbeans user. How would I configure Netbeans to use C++11? I cannot seem to find the option anywhere.
            Asked
            
        
        
            Active
            
        
            Viewed 2,727 times
        
    3 Answers
6
            right click on your project -> Properties -> Build -> C++ Compiler -> Basic Options/C Standard -> C++11
Adding -std=c++11 compiler switch is also possible there, under Compilation Line -> Additional Options.
Note that you need appropriately new NetBeans version to have C++11 support.
Further reading:
Setting Default NetBeans Options (-std=c99, -Wall) for C programs
        Community
        
- 1
 - 1
 
- 
                    This did the trick. Since C++98 was the default, do you know how I can set C++11 as the default for all future projects? – mrQWERTY Jul 06 '14 at 01:38
 - 
                    http://stackoverflow.com/questions/7882981/setting-default-netbeans-options-std-c99-wall http://stackoverflow.com/questions/4114042/netbeans-settings-for-gcc/11643274 – Jul 06 '14 at 01:46
 - 
                    Haha, those answers seem really improvised. Anyways, I heard jetbrains is rolling out a C++ ide,so maybe that is more polished than netbeans. – mrQWERTY Jul 06 '14 at 02:45
 
1
            
            
        Right click Project->Properties->Buld->C++ Compiler->Basic Options->C++ Standard
Note that using C++11 won't work though unless you have G++ 4.7 or later, which is not on a debian package yet. So, you can either build the newest version of G++ (4.7.4) or set the compilation line->Addition options to "-std=c++0x", which is the same as the C++11 according to this post:
- 
                    I use debian and debian's gcc packackage is 4.7 version. so it's possible to use c++11. – codekiddy Jul 06 '14 at 01:41