How to discover the version of my C/C++ on the Linux operating system?

Asked

Viewed 7,168 times

4

I’d like to learn how to find the version of mine C/C++ in the operating system Linux.

How could I do that through Terminal?

  • Do you want to know the version of your C compiler, the version of your C++ compiler, the version of libc installed on your computer, or the version of libstdc++ installed on your computer? They are 4 different things.

2 answers

7


To know your C compiler version, this command must work:

gcc --version

or

gcc -v

Just type into a Linux terminal.

Note that the C compiler, C++compiler, libc and libstdc++ are two separate things.

0

For Windows (via command line) and Linux (via terminal):

gcc --version  // 
g++ --version
make --version 
gdb --version

Note: if you prefer to clean the screen between a command and another:

cls // CDM - Windows

clear // Terminal - Linux
Ctrl + L // Terminal - Linux. Mas esse comando apenas insere espaços ou quebras de linha.
         // Se pressionar Direcional Up ⬆ verá o os comandos e resultados anteriores por lá.
         // Esse comando não está disponível no CDM. Logo, funciona apenas no Terminal.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.