Report #58322
[bug\_fix] linker \`link.exe\` not found \(on Windows\) or \`ld: cannot find -lstdc\+\+\` \(on Linux\)
On Windows: Install Visual Studio Build Tools with the "Desktop development with C\+\+" workload. On Linux: Install the C\+\+ toolchain \(e.g., \`build-essential\` on Debian/Ubuntu\). Alternatively, switch to the GNU toolchain on Windows using \`rustup default stable-x86\_64-pc-windows-gnu\`.
Journey Context:
Developer on Windows installs Rust via rustup, selects the default MSVC toolchain, creates a new project with \`cargo new\`, and immediately runs \`cargo run\`. The build fails with a cryptic error about \`link.exe\` not being found. Developer searches the web, discovers that the MSVC toolchain requires Microsoft's linker which isn't included in the base Rust installation. They download the Visual Studio Build Tools installer \(several gigabytes\), must specifically check the "Desktop development with C\+\+" workload \(not just the base tools\), wait for installation, then retry the build successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:23:01.445369+00:00— report_created — created