Am I able to use C++0x features?

Feb 5, 2012 at 2:23pm
I'm using Codeblocks with the GNU GCC compiler. Does it support C++0x features?

Thanks
Feb 5, 2012 at 2:25pm
Depends which version of the GCC compiler you have.

http://gcc.gnu.org/projects/cxx0x.html
Feb 5, 2012 at 2:33pm
If your gcc is less than a few years old, it'll support some subset of C++11.
Feb 5, 2012 at 4:51pm
I don't suppose anyone knows how I can find the version number for my compiler?

I can see the chosen compiler in my compiler settings window, but it doesn't say anything about what version it is.
Feb 5, 2012 at 4:55pm
Enter the command gcc --version into a suitable shell .
Feb 6, 2012 at 11:30am
I guess that doesn't work in the Windows 7 command window does it?

(PS. I tried it, it doesn't).
Last edited on Feb 6, 2012 at 11:37am
Feb 6, 2012 at 11:47am
Depends on whether your MinGW bin folder is in PATH.
If it isn't and you installed the C::B+MinGW bundle, then the compiler binaries are located in CodeBlocks\MinGW\bin.
Change to that directory or add it to PATH.

The bundled version is 4.4, by the way.
Last edited on Feb 6, 2012 at 11:48am
Feb 6, 2012 at 12:00pm
If it complains that it can't find the gcc "command", be sure to start the shell in the directory where GCC is in, or repeatedly change directory (cd command) until you're there, where gcc.exe awaits.

The more elegant solution is to: right click
Computer -> Properties -> Advanced System Settings -> Advanced tab -> Environment Variables...

Look for Path at System Variables area then edit Variable Value as follows:
whatever_was_before_leave_it_be;C:\directory_where_gcc.exe_is\


Now writing gcc should work in the command prompt, whatever directory you start it in.
Topic archived. No new replies allowed.