Lesson 2 / 38

Environment Setup

Install the GCC or Clang compiler on your system and confirm it works with a version check.

You need a compiler

The two common C compilers are GCC and Clang. A text editor and a terminal complete the toolkit.

Install

Pick the line for your OS.

# Debian / Ubuntu
sudo apt install build-essential

# macOS
xcode-select --install

# Windows: install MSYS2 / MinGW-w64, or use WSL

Verify + warnings

Run gcc --version to confirm the install. While learning, always compile with -Wall -Wextra to surface mistakes early.