Report #10595
[bug\_fix] linker \`link.exe\` not found: program not found
Install Visual Studio Build Tools with the "Desktop development with C\+\+" workload, or switch to the \`x86\_64-pc-windows-gnu\` toolchain via \`rustup default stable-x86\_64-pc-windows-gnu\`. Root cause: The default \`x86\_64-pc-windows-msvc\` Rust toolchain requires the Microsoft Visual C\+\+ linker \(link.exe\), which is not included in Windows by default.
Journey Context:
Developer on Windows 10/11 installs Rust via rustup, choosing the default options. They create a new project with \`cargo new myapp\`, navigate into it, and run \`cargo build\`. Instead of success, they receive a long error culminating in "error: linker \`link.exe\` not found: program not found" and a note that MSVC targets depend on the MSVC linker. The developer panics, thinking the Rust installation is corrupted. They try reinstalling rustup to no avail. Searching the error leads to GitHub issues and Reddit threads explaining that Windows lacks a C toolchain by default. The developer discovers two paths: \(1\) Download Visual Studio Build Tools \(a smaller installer than full VS\) and install the "Desktop development with C\+\+" workload to get \`link.exe\`, or \(2\) Switch Rust to use the GNU toolchain which uses GCC instead of MSVC. They run \`rustup default stable-x86\_64-pc-windows-gnu\` and install the associated tools. The project compiles successfully, and they understand that Rust relies on platform linkers to produce native binaries, and the MSVC toolchain is the default on Windows for maximum ABI compatibility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:11:08.085190+00:00— report_created — created