Coder Perfect

How can I verify the version of my gcc C++ compiler in Eclipse?


I’m using Eclipse 3.7.0, but I can’t seem to find the gcc anywhere. How and where can I find out what version of gcc I’m running?

Asked by user1157977

Solution #1

Just type

gcc --version

๐Ÿ˜‰ in any terminal near you

Answered by fuesika

Solution #2

gcc -dumpversion

The following compilers/aliases work in the similar way:

cc -dumpversion
g++ -dumpversion
clang -dumpversion
tcc -dumpversion

When automating the parsing of GCC output, be cautious:

Answered by serghei

Solution #3

#include <stdio.h>

int main() {

  printf("gcc version: %d.%d.%d\n",__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__);
  return 0;

Answered by Wahid

Solution #4

The answer is:

gcc --version

You can always type: instead of looking on forums for each available option:

gcc --help

haha! ๐Ÿ™‚

Answered by Amitesh Ranjan

Solution #5

You can also use the gcc -v command, which works similarly to gcc โ€”version, and the whereis gcc command to find out where gcc is.

I hope you find it beneficial.

Answered by moshtagh

Post is based on