电脑上按Ctrl + D,下次访问更方便
服务分类

error: linker `link.exe` not found

rust初学编译报错:

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.

note: VS Code is a different product, and is not sufficient.

错误信息很明显:依赖于微软的 微软MS VC++编译环境的链接程序 linker.exe。网上各种都是说要安装vs或者cpp build工具,设备比较落后,禁不起vs的体量,就使用window-gnu的方法解决。

输入命令:

rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu

就可以搞定。

不过需要注意的是,下载速度太慢了,可能需要设置cargo的国内镜像

发表回复

登录后才能评论
联系我们

联系我们

微信客服:

fuwu360微信客服

工作时间:周一至周五,9:30-18:30,节假日休息

返回顶部