Report #66144
[bug\_fix] Windows linker \`link.exe\` not found
Install the Visual C\+\+ Build Tools \(or full Visual Studio\) with the 'Desktop development with C\+\+' workload, or switch to the GNU toolchain by running \`rustup default stable-x86\_64-pc-windows-gnu\`. The root cause is that Rust's default MSVC target requires the Microsoft linker \(link.exe\) and system libraries \(kernel32.lib, etc.\) which are only available through Microsoft's build tools.
Journey Context:
You just installed Rust via rustup on a fresh Windows 11 machine. You run \`cargo new hello\_world && cd hello\_world && cargo build\` expecting a quick compile. Instead, you get a cryptic error: 'linker \`link.exe\` not found'. You search the error and find GitHub issues suggesting you need Visual Studio. You download the Visual Studio Community installer but are overwhelmed by the workload options. You try selecting just 'Visual Studio Build Tools' but still get the error because you missed the 'Desktop development with C\+\+' workload which provides the C\+\+ linker and Windows SDK libraries. After installing the correct workload \(or alternatively, running \`rustup default stable-x86\_64-pc-windows-gnu\` to use the MinGW toolchain instead\), the build succeeds because the linker is now available in PATH or the GNU toolchain uses gcc instead of link.exe.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:30:20.562373+00:00— report_created — created