Glossary

gcc

gcc is the GNU Compiler Collection, one of the foundational tools of the free-software world. Originally the "GNU C Compiler", it now compiles C, C++, Fortran, Ada, Go, Objective-C, and D. On most Linux systems gcc without arguments means the C compiler; g++ invokes the C++ driver.

gcc hello.c                      # compile to a.out
gcc -o hello hello.c             # name the output
gcc -O2 -Wall -Wextra src.c      # optimised, with warnings
gcc -g src.c                     # include debug info for gdb
gcc -c file.c                    # compile only (produce file.o)
gcc file1.o file2.o -o prog      # link object files

GCC competes with clang (the LLVM-based compiler), which has better error messages and tooling but slightly different extension support. The Linux kernel is built with gcc by default; as of 2022 it can also be built with clang.

Related terms: make, clang, GNU

Discussed in:

This site is currently in Beta. Contact: Chris Paton

Textbook of AI · Textbook of Usability · Textbook of Digital Health

Auckland Maths and Science Tutoring

AI tools used: Claude (research, coding, text), ChatGPT (diagrams, images), Grammarly (editing).