Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have Debian 6.04 , and the latest gcc version included is gcc 4.4 , and this version doesn't support C++11 , and i look for another version support C++11 ( some features not completely supported ) , so i follow this Page

I suggest to install it and My NetBeans IDE succeeded to find gcc 4.7 andlink it , but when i compile the code using a test by using std::unique_ptr i get this error message :

This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

i found the error source and her is :

bits/c++0x_warning.h

#ifndef _CXX0X_WARNING_H
#define _CXX0X_WARNING_H 1

#ifndef __GXX_EXPERIMENTAL_CXX0X__
#error This file requires compiler and library support for the 
ISO C++ 2011 standard. This support is currently experimental, and must be 
enabled with the -std=c++11 or -std=gnu++11 compiler options.
#endif

#endif
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
553 views
Welcome To Ask or Share your Answers For Others

1 Answer

The error says it all. Trying adding -std=c++11 or -std=gnu++11 to the compiler options in your NetBeans IDE.

I've not used Netbeans but see this link where a snapshot of build variables is shown and that is where you need to add the compiler options.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...