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.
2
macOS: Install Xcode Command Line Tools
macOS comes with Clang compiler, but you need to install command line tools.
Installation Steps
- Open Terminal
- Run:
xcode-select --install - Follow the installation prompts
- 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.
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:
- Open VS Code
- Press
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(macOS) - Search for "C/C++" by Microsoft
- Click "Install"
- 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
- Download Dev-C++
- Run the installer
- Follow the setup wizard
- Dev-C++ includes MinGW compiler
Verification & Testing
Test Compiler Setup
Verify your compiler is working properly:
Check Compiler Version:
- Open terminal/command prompt
- Run:
gcc --version - 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:
- Create a new folder for your C projects
- Open the folder in VS Code
- Create
hello.cwith the code above - Press
Ctrl+Shift+Bto build - Run the executable from terminal