Rust 问题汇总

Rust 问题汇总

你好! 欢迎来到 Rust 问题汇总,在这里你查找在你进行 Rust 编程过程中遇到的问题。

安装问题

问题一:error: linker link.exe not found
  1. windows 安装 Rust 成功后,编写 hello 程序出现
error: linker `link.exe` not found
  |
  = note: 系统找不到指定的文件。 (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: aborting due to previous error
error: could not compile `hello-rust`.

该问题是因为rust编译程序需要vs c++编译工具,如果缺少 C++ build tools 会导致(如果计算机上未安装 Visual Studio,则 Microsoft 生成工具 2015 可提供用于生成托管应用程序的必要工具。)
解决:

  1. 安装 C++ build tools,地址:C++ build tools.(已验证,安装完[3.12G]即可解决问题)
  2. 下载 Visual Studio 安装包,然后选择 C ++工具,在选项只选 MSVC v142 - VS2019(或2015/2017) C++ x64/x86 生成工具,安装成功后重启电脑。(此方法单独安装,验证失败,不知道哪个依赖库没有找到;建议可进行完整安装试试,完整安装未验证!!!)
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值