How to Install C Compiler
Windows
We recommend installing MinGW-w64 or TDM-GCC:
- Download the installer from the official website.
- Follow the installation instructions.
- Add the
bin
directory of the compiler to yourPATH
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