Skip to the content.

How to Install C Compiler

Windows

We recommend installing MinGW-w64 or TDM-GCC:

  1. Download the installer from the official website.
  2. Follow the installation instructions.
  3. Add the bin directory of the compiler to your PATH environment variable.

macOS

Open a terminal and run:

xcode-select --install

This will install the Xcode Command Line Tools, including gcc and clang.

Linux (Debian/Ubuntu)

Open a terminal and run:

sudo apt update
sudo apt install build-essential

This will install gcc, g++, and other essential tools for compiling C programs.

Check your installation

From the command line, check the compiler version:

gcc --version

or

clang --version