Rust在windows下第一课,编译报错:

cargo buildCompiling rsj-kv v0.1.0 (D:\workspace\git\rsj-kv)
error: linker `link.exe` not found|= note: 系统找不到指定的文件。 (os error 2)note: the msvc targets depend on the msvc linker but `link.exe` was not foundnote: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ optionerror: could not compile `rsj-kv` due to previous error

错误信息很明显:依赖于微软的 msvc linker.exe

一般让去下载VS,不过可以直接用rust命令解决。

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

完整运行过程:

PS D:\workspace\git\rsj-kv\src> rustup toolchain install stable-x86_64-pc-windows-gnu
info: syncing channel updates for 'stable-x86_64-pc-windows-gnu'
info: latest update on 2021-12-02, rust version 1.57.0 (f1edd0429 2021-11-29)
info: downloading component 'cargo'7.0 MiB /   7.0 MiB (100 %)   1.6 MiB/s in  4s ETA:  0s
info: downloading component 'clippy'3.4 MiB /   3.4 MiB (100 %)   1.6 MiB/s in  2s ETA:  0s
info: downloading component 'rust-docs'17.8 MiB /  17.8 MiB (100 %)   1.2 MiB/s in 13s ETA:  0s
info: downloading component 'rust-mingw'4.2 MiB /   4.2 MiB (100 %)   1.7 MiB/s in  2s ETA:  0s
info: downloading component 'rust-std'34.0 MiB /  34.0 MiB (100 %)   1.6 MiB/s in 21s ETA:  0s
info: downloading component 'rustc'
141.0 MiB / 141.0 MiB (100 %)   1.3 MiB/s in  1m 36s ETA:  0s
info: downloading component 'rustfmt'6.2 MiB /   6.2 MiB (100 %)   1.6 MiB/s in  4s ETA:  0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'17.8 MiB /  17.8 MiB (100 %)   1.9 MiB/s in  6s ETA:  0s
info: installing component 'rust-mingw'4.2 MiB /   4.2 MiB (100 %)   3.9 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'34.0 MiB /  34.0 MiB (100 %)  14.1 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
141.0 MiB / 141.0 MiB (100 %)  13.5 MiB/s in 10s ETA:  0s
info: installing component 'rustfmt'stable-x86_64-pc-windows-gnu installed - rustc 1.57.0 (f1edd0429 2021-11-29)info: checking for self-updates
PS D:\workspace\git\rsj-kv\src> rustup default stable-x86_64-pc-windows-gnu
info: using existing install for 'stable-x86_64-pc-windows-gnu'
info: default toolchain set to 'stable-x86_64-pc-windows-gnu'stable-x86_64-pc-windows-gnu unchanged - rustc 1.57.0 (f1edd0429 2021-11-29)PS D:\workspace\git\rsj-kv\src> cargo buildCompiling rsj-kv v0.1.0 (D:\workspaced\git\rsj-kv)Finished dev [unoptimized + debuginfo] target(s) in 1.49s
PS D:\workspace\git\rsj-kv\src> cargo runFinished dev [unoptimized + debuginfo] target(s) in 0.01sRunning `D:\workspace\git\rsj-kv\target\debug\rsj-kv.exe`
Hello, world!

error: linker `link.exe` not found相关推荐

  1. [Rust]cargo run时error: linker `link.exe` not found

    问题 cargo run时error: linker link.exe not found 解决办法 在 Linux 或 macOS 上安装 rustup 如果你使用的是 Linux 或 macOS, ...

  2. Rust在windows下安装以后cargo build Error: linker `link.exe` not found

    问题示例: D:\rust\runoob-greeting\greeting>cargo build error: linker `link.exe` not found|= note: 系统找 ...

  3. vc6.0报delete and rebuild Error executing link.exe.错误

    fatal error LNK1207: incompatible PDB format in "*******"; delete and rebuild VC中错误:LINK : ...

  4. VC里面的Error spawning link.exe 或者cl.exe

    这个问题很多情况下是由于路径设置的问题引起的, 点击VC"TOOLS(工具)"->"Option(选择)"->"Directories(目 ...

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

    the msvc targets depend on the msvc linker but link.exe was not found 错误显示: C:/Users/Administrator/. ...

  6. clang++.exe: error: linker command failed with exit code 1 错误解决方法

    clang++.exe: error: linker command failed with exit code 1 错误解决方法 错误信息如下: Build command failed. Erro ...

  7. MFC程序解析以及使用cl.exe、link.exe编译连接Windows API和MFC程序

    目录 一.实验目的 二.实验配置 三.MFC程序创建和解析 (一).创建MFC程序 (二).分析MFC程序 四.使用cl.exe和link.exe (一).Windows API 1.实验代码 2.实 ...

  8. VC6.0执行 link.exe 时出错

    执行 link.exe 时出错 编译程序中,没有问题,但是组建的过程中,一直报错,原以为是自己代码的问题.最后索性就只打印"hello world",还是报错,这就排除了代码的错误 ...

  9. \V110\Microsoft.CppCommon.targets(347,5): error MSB6006: “CL.exe”已退出,代码为 -1073741515。的解决方法

    VS2012调试工程,出现如下问题: \V110\Microsoft.CppCommon.targets(347,5): error MSB6006: "CL.exe"已退出,代码 ...

最新文章

  1. 52. N-Queens II N皇后II
  2. 重温WEB开发系列(二)HTML HEAD
  3. CacheManager - 用 C# 编写的 .NET 的开源缓存抽象层
  4. 最全的BAT大厂面试题整理,系列篇
  5. mysqldump: Got errno 28 on write
  6. ASP.NET的自定义分页
  7. html/css静态网页制作
  8. 华为无线模板之间的应用关系图
  9. 如何取消坚果云的分享链接
  10. 查询商品分类id为10或11的商品对应的商品信息
  11. 一口气了解【2021 阿里云峰会】重磅发布
  12. 语义分割|学习记录(4)膨胀卷积(空洞卷积 )
  13. 微信小程序学习2022.11.22
  14. supervisor的用法
  15. 【2】Kubernetes集群安装
  16. 21个免费的UI界面设计工具、资源及网站
  17. Infor与AI的美丽邂逅
  18. Android Socket IQ聊天软件 之 聊天气泡编码步骤讲解
  19. 大数据、云计算、物联网、数据仓库、OLAP、OLTP、等大数据你必须知道并且了解的概念及相关关系,我的一些总结
  20. 千寻位置NTRIP网络基准站

热门文章

  1. linux下的mnt/hgfs/的共享目录无法出现的解决方案
  2. JavaScript基础学习、复习笔记
  3. 2014年8月25日 高铁时代
  4. 基于ssm框架实现的在线电影订票系统
  5. JAVA类与对象tank_实验四 类与对象
  6. html中span标签字数大小,DIV字体大小 span字体大小 font-size样式
  7. 快速安装 GitLab 并汉化
  8. @dynamic详细介绍
  9. python菜单翻译成中文_一个把网站全英文转成中文的方法,让你轻松看懂python官网...
  10. serverless架构