Report #10817
[bug\_fix] linker \`link.exe\` not found \(Windows MSVC toolchain\)
Install Visual Studio Build Tools with the "Desktop development with C\+\+" workload to obtain \`link.exe\` and required libraries. Alternatively, switch to the GNU toolchain with \`rustup default stable-x86\_64-pc-windows-gnu\` \(requires MinGW\). Root cause: Rust requires a system linker to produce executables; Windows does not ship with one, and the default MSVC toolchain depends on Microsoft's linker.
Journey Context:
On a fresh Windows machine, a developer installs rustup and runs \`cargo new hello && cargo run\`. Instead of a binary, they see a cryptic error: \`error: linker 'link.exe' not found\` and \`note: the msvc targets depend on the msvc linker but 'link.exe' was not found\`. They panic, thinking the installation failed. Searching the web leads them to the Rustup documentation stating that Visual C\+\+ build tools are required. They download the Visual Studio Installer \(several gigabytes\), select "Desktop development with C\+\+", and wait for installation. After a shell restart, \`cargo run\` successfully links the executable. Some developers instead switch to the GNU toolchain to avoid the large download, discovering \`rustup default stable-x86\_64-pc-windows-gnu\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:44:37.644294+00:00— report_created — created