關于Rust編譯時報link.exe?not?found錯誤問題
我在Windows 7上面配置Rust運行環(huán)境的時候報了下面的錯誤,差點導致我去裝Windows11或者換Linux...
這個Windows7真是讓人頭疼,各種組件都是缺失的,要我一個一個安裝,缺少各種dll,NET.flamework就弄了半天...... VisualStudioCode直接打不開
廢話不多說,展示一下報錯內容
C:\rustspace>rustc main.rs
error: linker `link.exe` not found
|
= note: 系統(tǒng)找不到指定的文件。 (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打開,想必大家都知道,不過多強調)
執(zhí)行下面兩行命令:
rustup toolchain install stable-x86_64-pc-windows-gnu rustup default stable-x86_64-pc-windows-gnu
這是再運行一下,錯誤就沒了,eclipse和idea都好了
這樣問題就會完美解決。
到此這篇關于Rust編譯的時候報出link.exenotfound錯誤的文章就介紹到這了,更多相關Rust編譯報錯內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Rust開發(fā)環(huán)境搭建到運行第一個程序HelloRust的圖文教程
本文主要介紹了Rust開發(fā)環(huán)境搭建到運行第一個程序HelloRust的圖文教程,文中通過圖文介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2023-12-12