当前位置: 首页 > news >正文

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 foundnote: the msvc targets depend on the msvc linker but `link.exe` was not foundnote: 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

Have fun learning about rust!

http://www.lryc.cn/news/520259.html

相关文章:

  • Vue.js组件开发-如何使用moment.js
  • Linux第二课:LinuxC高级 学习记录day01
  • 《DOM NodeList》
  • Nginx代理同域名前后端分离项目的完整步骤
  • uniapp页面高度设置(铺满可视区域、顶部状态栏高度、底部导航栏高度)
  • 解锁 RAG 技术:从原理、论文研读走向实战应用RAG
  • HTML5实现好看的中秋节网页源码
  • 数字孪生笔记 1 工业数字孪生的意义
  • 013:深度学习之神经网络
  • 计算机网络(四)网络层
  • 【ArcGIS微课1000例】0138:ArcGIS栅格数据每个像元值转为Excel文本进行统计分析、做图表
  • Linux 中统计进程的线程数 | 查看进程的线程
  • 【深度学习 】训练过程中loss出现nan
  • Linux - 什么是线程和线程的操作
  • windows及linux 安装 Yarn 4.x 版本
  • 如何设计一个 RPC 框架?需要考虑哪些点?
  • 初学stm32 --- DAC输出三角波和正弦波
  • 开源cJson用法
  • 【学习笔记】理解深度学习和机器学习的数学基础:数值计算
  • 如何使用CSS让页面文本两行显示,超出省略号表示
  • likeshop同城跑腿系统likeshop回收租赁系统likeshop多商户商城安装及小程序对接方法
  • C# 与 Windows API 交互的“秘密武器”:结构体和联合体
  • PHP 使用 Redis
  • 嵌入式系统Linux实时化(四)Xenomai应用开发测试
  • 26个开源Agent开发框架调研总结(2)
  • Element UI与Element Plus:深度剖析
  • 二、BIO、NIO编程与直接内存、零拷贝
  • VSCode 更好用的设置
  • 【git】-3 github创建远程仓库,上传自己的项目,下载别人的项目
  • 计算机组成原理(1)