I'm writing some code that requires to have C++11 support for my Code::Blocks 12.11. I am using default GNU GCC Compiler came with MingW. Is there any way I can do this?
Run the downloaded installer. Accept the default options. Verify the Compiler's and Debugger's Path: (For CodeBlocks 13.12 For Windows) Goto "Settings" menu ⇒ "Compiler..." ⇒ In "Selected Compiler", choose "GNU GCC Compiler" ⇒ Select tab "Toolchain Executables" ⇒ Check the "Compiler's Installation Directory".
To see if your compiler has C++11 support, run it with just the --version option to get a print out of the version number. Do this for whichever compiler(s) you wish to use with Rosetta. Acceptable versions: GCC/g++: Version 4.8 or later.
C++11 is a version of the ISO/IEC 14882 standard for the C++ programming language. C++11 replaced the prior version of the C++ standard, called C++03, and was later replaced by C++14.
in codeblocks There isn't a C++17 option in the Build or Compiler options, only C++14 how can i enable it in codeblocks so that both coding tools and compiler support it? Pass -std=c++17 as an option to the compiler (if using clang or gcc). Then avoid it and use the Boost equivalent.
Toolbar -> Settings -> Compiler
Selected compiler
drop-down menu, make sure GNU GCC Compiler
is selectedcompiler settings
tab and then the compiler flags
tab underneathHave g++ follow the C++11 ISO C++ language standard [-std=c++11]
" is checkedOK
to saveThe answer with screenshots (put the checkbox as in the second pic, then press OK):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With