Install +g++”, “git”, and “make” on Windows 11

One simple setup (w64devkit)

w64devkit is a tiny, portable toolchain for Windows that includes g++, make, and gdb. No installers, no extra shells.

1) Get the tools

  1. Download w64devkit (x86_64) zip (portable).:
    Releases (pick the w64devkit-x86_64-<version>.zip asset):
    https://github.com/skeeto/w64devkit/releases GitHub
    Project page (docs/usage):
    https://github.com/skeeto/w64devkit GitHub
  2. Quick steps: download the x86_64 ZIP → extract to C:\w64devkit → add C:\w64devkit\bin to your System Path → restart VS Code. (It includes GCC/G++, GDB, and GNU Make.) mingw-w64.org

2) Add to PATH (so VS Code can find g++/make)

  1. Press Win+Rsysdm.cplAdvanced tab → Environment Variables…
  2. Under System variables, select PathEditNew → add: C:\w64devkit\bin
  3. Click OK on all dialogs.

3) Restart VS Code and verify

  • Open VS CodeTerminal → New Terminal (PowerShell is fine).
  • Run: g++ --version make --version You should see versions (no “not found” errors).

4) Quick test

  1. Create a folder (e.g., hello) with these two files.

main.cpp

#include <iostream>
int main() {
    std::cout << "Hello from C++!\n";
    return 0;
}
Code language: PHP (php)

Makefile (capital M)

CXX := g++
CXXFLAGS := -std=c++17 -Wall -Wextra -O2
TARGET := app
SRC := main.cpp

all: $(TARGET)

$(TARGET): $(SRC)
	$(CXX) $(CXXFLAGS) $(SRC) -o $(TARGET)

clean:
	rm -f $(TARGET).exe
Code language: JavaScript (javascript)
  1. In the VS Code terminal: make .\app.exe Output: Hello from C++!

Common gotchas (fast fixes)

  • g++ or make still “not found”
    You didn’t restart VS Code, or C:\w64devkit\bin isn’t really in System PATH. Recheck the Path entry and reopen VS Code.
  • Makefile doesn’t “clean”
    Use rm -f app.exe exactly as shown (w64devkit includes rm). If you swapped it for Windows del, it may fail under make.

That’s it. This route takes a couple of minutes and works in the default VS Code PowerShell terminal—no MSYS2 profiles, no extra shells.

Scroll to Top