error: linker `link.exe` not found
开始学习rust,安装好rust的情况,开始从hello world开始,结果用在win10情况下,使用vs code或cmd窗口编译rust报错:PS E:\study_codes\rust-demo\chart01> rustc hello.rs
error: linker `link.exe` not found
|
= note: program not found
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
note: VS Code is a different product, and is not sufficient.
error: aborting due to 1 previous error vs code或cmd窗口中运行以下命令即可解决:
rustup uninstall toolchain stable-x86_64-pc-windows-msvc
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu 运行rust编译命令:
rustc hello.rs
.\hello.exe 天生一个hello.exe文件
运行结果:
hello world
https://i-blog.csdnimg.cn/direct/695ec22cf258422190fa62240e4e5327.png
Have fun learning about rust!
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]