Author Topic: C++ 11 support  (Read 3211 times)

ApocAlypsE

  • Guest
C++ 11 support
« on: July 22, 2015, 11:17:38 am »
Hello.
I am using Code Blocks 13.12 in Win7 32bit (old laptop) and I need to use the tuple library, so I need C++ 11 support. I've googled it and I saw that I need to activate an option in Settings->Compiler that reads: "Have g++ follow the C++ 11 ISO C++ language standard", however that option does not appear for me. I've also wrote -std=c++11 in "other options" but CB doesn't seem to recognize it. How do I use C++ 11 libraries?
Any help will be appreciated.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: C++ 11 support
« Reply #1 on: July 22, 2015, 01:35:20 pm »
First C::B is not a compiler but a ide (https://en.wikipedia.org/wiki/Integrated_development_environment) We don't know which compiler do you use, so we can't say if he supports c++11

Hello.
I am using Code Blocks 13.12 in Win7 32bit (old laptop) and I need to use the tuple library, so I need C++ 11 support. I've googled it and I saw that I need to activate an option in Settings->Compiler that reads: "Have g++ follow the C++ 11 ISO C++ language standard", however that option does not appear for me. I've also wrote -std=c++11 in "other options" but CB doesn't seem to recognize it. How do I use C++ 11 libraries?
Any help will be appreciated.

Your steps are correct but you should put the compiler flags in Project->Build Options->Compiler settings->Other compiler options
The Settings->Compiler options are applied globally, not just only for your specific project...

If  this does not work pleas read this wiki article and post your next answer according to it...
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

thanks and
greetings

PS.: i would recommend to update your c::b to a nightly build, because 13.12 is 2 years old, and there are a lot bugfixes in the nightly builds