Skip to main content
Active reading [<https://en.wikipedia.org/wiki/C_%28programming_language%29> <https://en.wikipedia.org/wiki/Compiler> <https://en.wikipedia.org/wiki/Linux>].
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

CC is an environment variable referring to the system's C compiler. What it points to (libraries accessible, etc.) depend on platform. Often it will point to /usr/bin/cc, the actual c complierC compiler (driver). On linuxLinux platforms, CC almost always points to /usr/bin/gcc.

gcc is the driver binary for the GNU compiler collection. It can compile C, C++, and possibly other languages; it determines the language by the file extension.

g++ is a driver binary like gcc, but with a few special options set for compiling C++. Notably (in my experience), g++ will link libstdc++ by default, while gcc won't.

CC is an environment variable referring to the system's C compiler. What it points to (libraries accessible, etc) depend on platform. Often it will point to /usr/bin/cc, the actual c complier (driver). On linux platforms, CC almost always points to /usr/bin/gcc.

gcc is the driver binary for the GNU compiler collection. It can compile C, C++, and possibly other languages; it determines the language by the file extension.

g++ is a driver binary like gcc, but with a few special options set for compiling C++. Notably (in my experience), g++ will link libstdc++ by default, while gcc won't.

CC is an environment variable referring to the system's C compiler. What it points to (libraries accessible, etc.) depend on platform. Often it will point to /usr/bin/cc, the actual C compiler (driver). On Linux platforms, CC almost always points to /usr/bin/gcc.

gcc is the driver binary for the GNU compiler collection. It can compile C, C++, and possibly other languages; it determines the language by the file extension.

g++ is a driver binary like gcc, but with a few special options set for compiling C++. Notably (in my experience), g++ will link libstdc++ by default, while gcc won't.

Source Link
Managu
  • 9.1k
  • 2
  • 32
  • 36

CC is an environment variable referring to the system's C compiler. What it points to (libraries accessible, etc) depend on platform. Often it will point to /usr/bin/cc, the actual c complier (driver). On linux platforms, CC almost always points to /usr/bin/gcc.

gcc is the driver binary for the GNU compiler collection. It can compile C, C++, and possibly other languages; it determines the language by the file extension.

g++ is a driver binary like gcc, but with a few special options set for compiling C++. Notably (in my experience), g++ will link libstdc++ by default, while gcc won't.