Checking version of GCC compiler in Code::Blocks [closed]

Solution 1:

Run gcc --version, the result will be something like this:

gcc (GCC) 4.4.0
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If this doesn't work you might not have the compiler setup in your PATH correctly (I believe this is common if using MinGW on Windows), in which case you can first check where the compiler is located by doing the following within Code::Blocks:

  • Menubar Settings -> Compiler and Debugger
  • Select GNU GCC Compiler
  • Select the Toolchain executables tab

Then, using a command line, move to the directory given, then in to the bin subdirectory, then try running gcc --version from there.

Solution 2:

Typically execute the command

gcc --version

and it should give you result like this:

gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.