News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Cannot set -std=c++11

Started by freeze, August 17, 2013, 08:45:28 PM

Previous topic - Next topic

freeze

I am using Code::Blocks 12.11 with the bundled CNU GCC compiler.
Under "Compiler settings>Other options" I would like to set -std=c++11.
This does not seem to be allowed, although -std=gnu++11 works fine.
My understanding is that -std=gnu++11 allows some nonstandard features, and I would rather avoid this.
Why does -std=c++11 not seem to be possible to set?
Is this a compiler issue, or a Code::Blocks IDE issue?

stahta01

Try doing it under Project -> Build Options -> Compiler Flags
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

freeze


jellyhag

As "std" is what GNU call a "long option", if they are coherent with themselves, they'll require TWO dashes before the option, as such : --std=c++11. (I don't know if that should fix the problem... the "-static" option DOES take only one dash, for example... but you might want to try it if you write a custom makefile...