error: linker `link.exe` not found
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相关推荐
- [Rust]cargo run时error: linker `link.exe` not found
问题 cargo run时error: linker link.exe not found 解决办法 在 Linux 或 macOS 上安装 rustup 如果你使用的是 Linux 或 macOS, ...
- Rust在windows下安装以后cargo build Error: linker `link.exe` not found
问题示例: D:\rust\runoob-greeting\greeting>cargo build error: linker `link.exe` not found|= note: 系统找 ...
- vc6.0报delete and rebuild Error executing link.exe.错误
fatal error LNK1207: incompatible PDB format in "*******"; delete and rebuild VC中错误:LINK : ...
- VC里面的Error spawning link.exe 或者cl.exe
这个问题很多情况下是由于路径设置的问题引起的, 点击VC"TOOLS(工具)"->"Option(选择)"->"Directories(目 ...
- 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/. ...
- clang++.exe: error: linker command failed with exit code 1 错误解决方法
clang++.exe: error: linker command failed with exit code 1 错误解决方法 错误信息如下: Build command failed. Erro ...
- MFC程序解析以及使用cl.exe、link.exe编译连接Windows API和MFC程序
目录 一.实验目的 二.实验配置 三.MFC程序创建和解析 (一).创建MFC程序 (二).分析MFC程序 四.使用cl.exe和link.exe (一).Windows API 1.实验代码 2.实 ...
- VC6.0执行 link.exe 时出错
执行 link.exe 时出错 编译程序中,没有问题,但是组建的过程中,一直报错,原以为是自己代码的问题.最后索性就只打印"hello world",还是报错,这就排除了代码的错误 ...
- \V110\Microsoft.CppCommon.targets(347,5): error MSB6006: “CL.exe”已退出,代码为 -1073741515。的解决方法
VS2012调试工程,出现如下问题: \V110\Microsoft.CppCommon.targets(347,5): error MSB6006: "CL.exe"已退出,代码 ...
最新文章
- 52. N-Queens II N皇后II
- 重温WEB开发系列(二)HTML HEAD
- CacheManager - 用 C# 编写的 .NET 的开源缓存抽象层
- 最全的BAT大厂面试题整理,系列篇
- mysqldump: Got errno 28 on write
- ASP.NET的自定义分页
- html/css静态网页制作
- 华为无线模板之间的应用关系图
- 如何取消坚果云的分享链接
- 查询商品分类id为10或11的商品对应的商品信息
- 一口气了解【2021 阿里云峰会】重磅发布
- 语义分割|学习记录(4)膨胀卷积(空洞卷积 )
- 微信小程序学习2022.11.22
- supervisor的用法
- 【2】Kubernetes集群安装
- 21个免费的UI界面设计工具、资源及网站
- Infor与AI的美丽邂逅
- Android Socket IQ聊天软件 之 聊天气泡编码步骤讲解
- 大数据、云计算、物联网、数据仓库、OLAP、OLTP、等大数据你必须知道并且了解的概念及相关关系,我的一些总结
- 千寻位置NTRIP网络基准站