Adding -std=c++11 to compiler options in Anjuta 3.4.3

1.1k Views Asked by At

I'm fairly far in a project using GTKmm atm, and I'm trying to add in some code a friend of mine have been working on. However I'm getting this 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

However I can't find anywhere that will actually let me add these compiler options.

Adding it to Build -> Configure Project only yields a: Error: unrecognized option 'std=c++11'.

Anyone more familiar with this IDE who might be able to help?

1

There are 1 best solutions below

0
jcoppens On BEST ANSWER

Note that the commandline options start with a '-'. So the option is -std=c++11 (See man gcc).

Adding an option in Build -> Configure Project must be done like this

CXXFLAGS='-std=c++11'

You can also go to Project | Project options, then select your target in the top box. An options should appear 'More options'. Click on that, and you can enter -std=c++11 in the option field you want to use (probably Compiler flags).

It works here, but I have gcc version 4.8.x