Do you actually need it?
Not to start. The app's compile & run mode is Auto by default: it looks for a local compiler and falls back to a remote compile service when there is none. Install a local toolchain when you want:
- Faster builds (no upload/download of code),
- Offline work without any network,
- Full control over compiler and standard version.
Route A — MSYS2 (recommended)
- Download the MSYS2 installer from
msys2.organd run it (default install pathC:\msys64is fine). - Open MSYS2 UCRT64 from the Start menu.
- Install the compiler with
pacman -S mingw-w64-ucrt-x86_64-gcc. - Add the compiler folder to your PATH:
C:\msys64\ucrt64\bin(see the PATH section below). - Open a new terminal and verify with
g++ --version.
Route B — standalone MinGW-w64 build
- Download a current MinGW-w64 build for Windows (x86_64) from
winlibs.com. - Extract it to a short, space-free path, for example
C:\mingw64. - Add
C:\mingw64\binto PATH. - Verify in a new terminal with
g++ --version.
This route is a single folder with no package manager — convenient for lab images, where you can copy the same folder to every machine.
Adding the folder to PATH
- Press Win, type “environment variables” and open Edit the system environment variables.
- Click Environment Variables…
- Under User variables select Path → Edit… → New.
- Paste the compiler's
binfolder (for exampleC:\msys64\ucrt64\bin) and confirm all dialogs. - Close and reopen any terminal — existing windows keep the old PATH.
Then restart KuaiJiZi C++ Tutor: compiler detection happens at startup. Keep the mode on Auto or switch it to Local.
Verify it worked
g++ --version
where g++
The first command prints a version line (GCC 12 or newer is a good target). The second shows which g++ Windows will use — if it points somewhere unexpected, you have more than one compiler installed and PATH order decides.
Troubleshooting
“g++ is not recognized as an internal or external command”
The PATH entry did not take effect. Check that you added the bin folder (not the parent folder), that you edited the user or system PATH correctly, and that you opened a new terminal window.
The app still uses the remote service
Run where g++. If it prints nothing, the app cannot see the compiler either. If it prints a path, restart the app — detection only happens at launch — and make sure the mode is Auto or Local.
Compilation is very slow the first time
Antivirus scanning a newly installed compiler is the usual cause; subsequent builds are much faster. Excluding the toolchain folder from real-time scanning (if policy allows) also helps.
Errors about missing standard C++ features
The compiler is too old. Install a current build (GCC 12+) rather than an old package you may already have.
Should I install this on a school lab?
Not necessarily — remote compile mode keeps every machine identical with nothing to install. Install locally on teacher machines where faster offline builds matter.
Next: understand the three modes
Auto, local g++ and the remote compile service — when each one is the right choice.