Skip to content

clang

# Compiles into a binary "main.out"
clang++ main.cpp

-o

  • Output filename
clang \
  -o main.out \
  main.c # The source file to compile

-g

  • Generate source-level debug information
  • This includes debugging symbols
  • This is essential for debugging breakpoints
clang \
  -g \
  main.c