日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

關于Rust編譯時報link.exe?not?found錯誤問題_相關技巧

作者:A-Cloud ? 更新時間: 2022-11-09 編程語言

我在Windows 7上面配置Rust運行環境的時候報了下面的錯誤,差點導致我去裝Windows11或者換Linux...

這個Windows7真是讓人頭疼,各種組件都是缺失的,要我一個一個安裝,缺少各種dll,NET.flamework就弄了半天...... VisualStudioCode直接打不開

廢話不多說,展示一下報錯內容

C:\rustspace>rustc main.rs
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

花費了大量時間以后,我終于解決了這個問題,唉

解決方法是在命令行就是CMD(可以用Ctrl+R輸入cmd打開,想必大家都知道,不過多強調)

執行下面兩行命令:

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

這是再運行一下,錯誤就沒了,eclipse和idea都好了

這樣問題就會完美解決。

原文鏈接:https://blog.csdn.net/albertensterin/article/details/126877616

欄目分類
最近更新