Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: link.exe not found error when building Rust on Windows 11 (MSVC target)
link.exe not found error when building Rust on Windows 11 (MSVC target)
โ Rust ๐ 2025-08-20 ๐ค surdeus ๐๏ธ 5Hey Rustaceans,
I recently switched from Linux to Windows 11 and installed Rust. Cargo commands work fine, but when I try to build a project I get this error:
error: linker `link.exe` not found
|
= note: program not found
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
I installed Visual Studio 2022 and Build Tools 2022 with the C++ workload, but Rust still canโt find link.exe
. I even tried using WSL (Ubuntu) and installing the MSVC target there, but it still fails.
I couldnโt locate link.exe
to set a path manually. How can I correctly compile Rust for the x86_64 MSVC target on Windows 11?
Any guidance is appreciated!
3 posts - 3 participants
๐ท๏ธ Rust_feed