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++

  1. Find the Compiler: Search for "g++" and navigate to the WinLibs website.
  2. Select Version: Choose the appropriate version for your system (e.g., Win64 for 64-bit systems).
  3. Download: Download the .7z or .zip archive.
  4. 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:

  1. Copy the path to the bin folder (e.g., C:\mingw64\bin).
  2. Search for "Edit the system environment variables" in Windows.
  3. Click Environment Variables, find the Path variable under "System variables," and click Edit.
  4. Add the copied path and save.
  5. Verify: Open a terminal and type g++ --version to confirm the installation.

Step 3: Install CodeLite IDE

  1. Download: Go to the CodeLite website and download the Windows 64-bit installer.
  2. Installation: Run the installer and follow the on-screen prompts.
  3. Initial Setup: On the first launch, select the "C/C++ Development" profile.
  4. 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

  1. Workspace: Create a new workspace.
  2. New Project: Right-click the workspace and select New Project.
  3. Settings:
  • Category: Console
  • Type: Simple executable (g++)
  • Compiler: Select your MinGW-w64 installation.
  1. Build and Run: Write your code and press Ctrl + F9 to 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!