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

让人想犯罪 __ 提交于 2019-12-24 05:03:08

问题


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:


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



来源:https://stackoverflow.com/questions/29851717/adding-std-c11-to-compiler-options-in-anjuta-3-4-3

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