User forums > Using Code::Blocks

Cannot set -std=c++11

(1/1)

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

freeze:
Problem solved.
Thank you

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

Navigation

[0] Message Index

Go to full version