¿Cómo puedo comprobar mi versión del compilador gcc C++ para mi Eclipse?


Estoy usando Eclipse Release versión 3.7.0, pero no puedo encontrar el gcc en ninguna parte. ¿Cómo y dónde puedo ver la versión de gcc que estoy usando actualmente?

Author: Tshepang, 2013-12-05

5 answers

Simplemente escriba

gcc --version

En cualquier terminal cerca de usted.. ;-)

 81
Author: fuesika,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-12-05 00:49:45
gcc -dumpversion

-dumpversion Imprime la versión del compilador (por ejemplo, 3.0) - y no hagas nada más.

 11
Author: klay,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-04-05 12:21:14

La respuesta es:

gcc --version

En lugar de buscar en los foros, para cualquier opción posible siempre puede escribir:

gcc --help

Jaja! :)

 6
Author: Amitesh Ranjan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-12-01 17:31:51
#include <stdio.h>

int main() {

  printf("gcc version: %d.%d.%d\n",__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__);
  return 0;
}
 4
Author: Wahid,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-19 17:19:03

También puedes usar el comando gcc -v que funciona como gcc --version y si quieres ahora dónde está gcc puedes usar el comando whereis gcc

Espero que sea útil

 1
Author: moshtagh,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-07-23 17:33:54