3

Netbeans give me the following error:

"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.

Im not sure how to fix this. any help?

Runee
  • 53
  • 2
  • 5

1 Answers1

7

First: Open project properties and then Code Assistance->C++ Compiler. In C++ Standard select C++11.

Second: you must enable C++11 in your project. If you created the c++ project from inside Netbeans, in project properties->Build->C++ Compiler, you must set C++ standard to C++11, and then click on dots in Additional Options and ensure that the -std=c++11 option is enabled.

If you imported the project with external makefile, you must add manually this option in the makefile.

Jepessen
  • 11,744
  • 14
  • 82
  • 149