如果rust安装后,执行rustc *.rc命令报错:
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 VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option
error: aborting due to previous error
解决方案如下:
1. rustup uninstall toolchain stable-x86_64-pc-windows-msvc
2. rustup toolchain install stable-x86_64-pc-windows-gnu(or download rustup-init for the platform of your choice athttps://forge.rust-lang.org/infra/other-installation-methods.html)
3. rustup default stable-x86_64-pc-windows-gnu