gcc(1)
GNU C and C++ compiler
💡 On Debian/Ubuntu,
g++ is provided by gcc(1) — g++ is the C++ frontend of GCC — it accepts the same options
Description
GCC
NAME
gcc, g++ — GNU C and C++ compilers
NOTE
The GCC compiler suite does not ship a traditional man page in Debian. For complete documentation, use:
info gcc— full reference manualgcc --help— quick option summarygcc --version— compiler version info- Online: gcc.gnu.org/onlinedocs
SYNOPSIS
gcc [options] file...
COMMON OPTIONS
Compile and link: gcc -o output source.c
Compile only: gcc -c source.c
Optimize: gcc -O2 -o output source.c
Debug info: gcc -g -o output source.c
Warnings: gcc -Wall -Wextra source.c
Set C standard: gcc -std=c11 source.c