KuaiJiZi C++ Tutor · Setup

Compile & run modes: auto / local g++ / remote service

After building with blocks and hitting Run — where does the code actually compile? Why does one PC just work while another reports “no compiler found”? Here is how the three modes behave.

6 min read build & run · environment · troubleshooting desktop build

The three modes

Settings exposes a compile & run mode with three options:

  • Auto (default) — the desktop app first checks whether a C++ compiler is installed locally. If yes, it compiles locally; if not, the code is sent to the remote compile service. This is why the same installer can behave slightly differently across machines.
  • Local — always use the local g++. Compilation happens on your own PC with no network needed: ideal for individual study and debugging.
  • Remote — send the code to a remote compile service. The benefit is consistency across devices: machines without a local toolchain (lab images, tablets, locked-down PCs) still run exercises normally.
What you see — “compiling”, “build succeeded”, “build failed”, run output — is real compiler output, not a simulation: local mode calls your g++, remote mode compiles the same code on the service.

Local compilation: what to install

  1. Install a GNU C++ toolchain for Windows (for example MinGW-w64, selecting g++ during setup).
  2. Add the compiler's bin folder to the system PATH.
  3. Restart KuaiJiZi C++ Tutor — detection happens at startup — and keep the mode on Auto or Local.
  4. Run a tiny program (for example printing one line) to confirm it compiles locally and outputs correctly.
For labs and student machines, prefer remote mode: no per-machine toolchain, identical behaviour everywhere, and only one service for the teacher to maintain.

Using a remote compile service

In remote mode you enter the service address in Settings — either an institution's self-hosted service or one you run yourself. Two things to keep in mind:

  • Privacy: remote mode sends the code to that service. Exercise and teaching code is fine, but avoid submitting code containing sensitive information.
  • Availability: a wrong address or a stopped service means the build fails. Switch to Local temporarily to keep the lesson going.

Troubleshooting

“No compiler found” / always using remote

The local g++ was not detected. Verify MinGW-w64 is installed and its bin directory is on PATH — g++ --version should print a version — then restart the app.

Build failed and the errors look cryptic

Read the first error only; later ones are often knock-on effects. Typical causes: a missing semicolon, unbalanced brackets, an undefined variable, or a missing header for cin/cout. If you built with blocks, compare against the generated code.

It compiles but the output is wrong

Compare expected and actual output line by line — extra spaces or line breaks count. Practice projects show a side-by-side diff in the check bar.

Remote service unreachable

Check the address in Settings and whether the network can reach it; switch to Local to continue, or ask your administrator about the service status.

Next: close the practice loop

Load a practice project, add reference-answer code and let the app check whether your output matches.

Automatic practice checking Blocks to code