Lesson 2 / 36

Environment Setup

Install a compiler and confirm it works.

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.