知识卡片
Rust工具链分层排错
先运行 rustc --version 验证命令在 PATH 上可见。能显示版本但编译报找不到链接器时,检查该目标所需的系统开发工具链。rustup 管理 Rust 编译器和配套组件,系统链接器负责组合编译结果。可用 rustup doc 查阅已装工具链的本地文档。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 入门 Installation · 查看原书依据
You will also need a linker, which is a program that Rust uses to join its compiled outputs into one file. It is likely you already have one. If you get linker errors, you should install a C compiler, which will typically include a linker. A C compiler is also useful because some common Rust packages depend on C code and will need a C compiler.
参考来源
- 位置:《The Rust Programming Language(第2版)》第01章 入门(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c01.xhtml`,块 0019)
- 结论依据:原文给出链接器职责,并说明系统工具链与 C 依赖的关系。
- 原始内容:You will also need a linker, which is a program that Rust uses to join its compiled outputs into one file. It is likely you already have one. If you get linker errors, you should install a C compiler, which will typically include a linker. A C compiler is also useful because some common Rust packages depend on C code and will need a C compiler.