How do I set CodeBlocks 16.01 to C++11? My selected compiler is GNU GCC Compiler. There is no option for C++11 listed in Compiler Flags under Compiler Settings. If I type -std=c++11 into Other Compiler Options, it gives me an error: unrecognized command line option "-std=c++11".
You can try gcc --version at the command line. Or you should be able to view the version in the "Build Messages" tab of the "Log Window" of Code::Blocks.
Open a shell prompt. (IIRC, open the Run dialogue and enter cmd, then press Return.)
Type gcc --version followed by Return into the window which appears.
Okay then in Code::Blocks with no projects open select compiler settings from the Settings menu. Now go to the Tool executable tab and note the Compiler's Installation Directory.
In your shell prompt change to that directory and then type in bin/gcc --version.
I changed to that directory, but I'm still getting an error. What did I do wrong? This is what I typed in:
C:\Program Files (x86)\CodeBlocks\MinGW> bin/gcc --version
'bin' is not recognized as an internal or external command,
operable program or batch file.