Rust Unable to compile application | Error : linker `link.exe` not found

 Issue: cargo run

Compiling mars_calc v0.1.0 (C:UserschinnuDocumentsrustmars_calc)

error: linker `link.exe` not found  |  = note: The system cannot find the file specified. (os error 2)

note: the msvc targets depend on the msvc linker but `link.exe` was not found

note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option

error: could not compile `mars_calc` due to previous error

Solution:

Go to https://visualstudio.microsoft.com/visual-cpp-build-tools/ and it will download a Visual Studio Installer.

Run it as Administrator, then make sure you download all three things listed below in the screenshot, versions don’t matter, just try get latest ones.

required list

Hit Install. Reboot Computer.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks