Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: freeze on August 17, 2013, 08:45:28 pm

Title: Cannot set -std=c++11
Post by: freeze on August 17, 2013, 08:45:28 pm
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?
Title: Re: Cannot set -std=c++11
Post by: stahta01 on August 17, 2013, 10:08:11 pm
Try doing it under Project -> Build Options -> Compiler Flags
Title: Re: Cannot set -std=c++11
Post by: freeze on August 17, 2013, 11:18:36 pm
Problem solved.
Thank you
Title: Re: Cannot set -std=c++11
Post by: jellyhag on August 24, 2013, 11:31:04 pm
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...