top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In Linux, what is the difference between cc, gcc, g++ ?

+3 votes
616 views
In Linux, what is the difference between cc, gcc, g++ ?
posted Mar 26, 2015 by Chirag Gangdev

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

cc stands for "C compiler". On modern systems, cc is usually an alias to a program which can compile the C programming language, such as gcc or clang.

On a standard GNU/Linux system, running cc will execute gcc, the GNU compiler collection. This documentation therefore refers to syntaxes, options and behaviors which are in some cases gcc-specific. If your system is configured to alias the cc command to another compiler, you should consult your compiler's documentation for details about how its behavior may differ.

Command Syntax

cc [ options ]

gcc:

The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain. The Free Software Foundation (FSF) distributes GCC under the GNU General Public License (GNU GPL).

gcc and g++

gcc and g++ are compiler-drivers of the 'Gnu Compiler Collection' (which was once upon a time just the 'Gnu C Compiler').

Even though they automatically determine which backends (cc1 cc1plus ...) to call depending on the file-type, unless overridden with -x language, they have some differences.

The probably most important difference in their defaults is which libraries they link against automatically.

answer Mar 27, 2015 by Shivaranjini
Similar Questions
+2 votes

When I install any Software or tool in Linux by terminal it says you need to update using

sudo apt-get update

Then I get a list of upgrades available in my Linux.

What is the difference between 'Update Manager' and terminal 'sudo apt-get update'?

...