How to Install and Configure G++ with CodeLite IDE on Windows
May 13, 2026
Learn how to set up a complete C++ development environment on Windows. This guide covers installing the G++ compiler via WinLibs, configuring environment variables, and setting up the CodeLite IDE for your first project.
Overview
Setting up a C++ environment on Windows can be tricky. This tutorial provides a step-by-step walkthrough of installing the G++ compiler (MinGW-w64) and the CodeLite IDE to get your development workflow up and running.
Step 1: Download and Install G++
- Find the Compiler: Search for "g++" and navigate to the WinLibs website.
- Select Version: Choose the appropriate version for your system (e.g., Win64 for 64-bit systems).
- Download: Download the
.7zor.ziparchive. - Extract: Use a tool like 7-Zip to extract the folder to your
C:drive (e.g.,C:\mingw64).
Step 2: Configure Environment Variables
To use G++ from the command line:
- Copy the path to the
binfolder (e.g.,C:\mingw64\bin). - Search for "Edit the system environment variables" in Windows.
- Click Environment Variables, find the Path variable under "System variables," and click Edit.
- Add the copied path and save.
- Verify: Open a terminal and type
g++ --versionto confirm the installation.
Step 3: Install CodeLite IDE
- Download: Go to the CodeLite website and download the Windows 64-bit installer.
- Installation: Run the installer and follow the on-screen prompts.
- Initial Setup: On the first launch, select the "C/C++ Development" profile.
- Scan for Compiler: Let CodeLite scan for the G++ compiler. If it doesn't find it automatically, you can add it manually in the Build Settings.
Step 4: Create and Run Your First Project
- Workspace: Create a new workspace.
- New Project: Right-click the workspace and select New Project.
- Settings:
- Category: Console
- Type: Simple executable (g++)
- Compiler: Select your MinGW-w64 installation.
- Build and Run: Write your code and press
Ctrl + F9to build and run.
Pro Tip: Save as Template
Once your project is configured correctly (including linker settings like -static to avoid missing DLL errors), you can save it as a Project Template. This saves time for all future projects!