Setup Overview

What You'll Install

C Compiler (GCC or MinGW)
Code Editor (VS Code or Dev-C++)
Debugger Tools
Essential Extensions

Estimated Time

Compiler Setup: 20-30 minutes
Code Editor: 15-20 minutes
Configuration: 10-15 minutes
Total: 45-65 minutes

C Compiler Setup

1

Windows: Install MinGW-w64

MinGW-w64 provides GCC compiler for Windows systems.

Installation Method 1: MSYS2 (Recommended)

  1. Download MSYS2
  2. Run the installer and follow the setup wizard
  3. Open MSYS2 terminal and run: pacman -S mingw-w64-x86_64-gcc
  4. Add C:\msys64\mingw64\bin to your PATH

Installation Method 2: Direct Download

  1. Download MinGW-w64
  2. Extract to C:\mingw64
  3. Add C:\mingw64\bin to your PATH
2

macOS: Install Xcode Command Line Tools

macOS comes with Clang compiler, but you need to install command line tools.

Installation Steps

  1. Open Terminal
  2. Run: xcode-select --install
  3. Follow the installation prompts
  4. Verify with: gcc --version
3

Linux: Install GCC

Most Linux distributions come with GCC, but you may need to install build-essential.

Ubuntu/Debian

sudo apt update
sudo apt install build-essential

Fedora/CentOS

sudo dnf install gcc gcc-c++ make
# or for CentOS/RHEL:
sudo yum install gcc gcc-c++ make

Code Editor Setup

1

Install Visual Studio Code

VS Code is a powerful, free code editor with excellent C support.

Windows

Download the Windows x64 User Installer

Download for Windows

macOS

Download the macOS Universal .zip file

Download for macOS

Linux

Download the Linux .deb or .rpm package

Download for Linux
2

Install C/C++ Extension

Essential Extensions

  • C/C++ by Microsoft - IntelliSense, debugging, and code browsing
  • C/C++ Compile Run - Quick compile and run
  • Code Runner - Run code snippets

How to Install Extensions:

  1. Open VS Code
  2. Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS)
  3. Search for "C/C++" by Microsoft
  4. Click "Install"
  5. Repeat for other extensions
3

Alternative: Dev-C++ (Windows)

Dev-C++ is a lightweight IDE specifically designed for C/C++ development on Windows.

Installation Steps

  1. Download Dev-C++
  2. Run the installer
  3. Follow the setup wizard
  4. Dev-C++ includes MinGW compiler

Verification & Testing

Test Compiler Setup

Verify your compiler is working properly:

Check Compiler Version:

  1. Open terminal/command prompt
  2. Run: gcc --version
  3. You should see version information

Create Test Program:

Create a file named hello.c:

#include <stdio.h>

int main() {
    printf("Hello, C Programming!\n");
    return 0;
}

Compile and Run:

gcc hello.c -o hello
./hello    # Linux/macOS
hello.exe  # Windows

If you see "Hello, C Programming!" output, your setup is working!

Test VS Code Setup

Verify your code editor is configured correctly:

VS Code Testing Steps:

  1. Create a new folder for your C projects
  2. Open the folder in VS Code
  3. Create hello.c with the code above
  4. Press Ctrl+Shift+B to build
  5. Run the executable from terminal

🎉 Setup Complete!

You now have a fully configured C programming environment. You're ready to start coding!