Skip to content

Commit

Permalink
Revise linker installation instructions. Fixes #2151.
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Jul 17, 2021
1 parent f1f8b73 commit dd76781
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/ch01-01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ for your password. If the install is successful, the following line will appear:
Rust is installed now. Great!
```

Additionally, you’ll need a linker of some kind. It’s likely one is already
installed, but when you try to compile a Rust program and get errors indicating
that a linker could not execute, that means a linker isn’t installed on your
system and you’ll need to install one manually. C compilers usually come with
the correct linker. Check your platform’s documentation for how to install a C
compiler. Also, some common Rust packages depend on C code and will need a C
compiler. Therefore, it might be worth installing one now.
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.

On macOS, you can get a C compiler by running:

```console
$ xcode-select --install
```

Linux users should generally install GCC or Clang, according to their
distribution's documentation. For example, if you use Ubuntu, you can install
the `build-essential` package.

### Installing `rustup` on Windows

Expand Down

0 comments on commit dd76781

Please sign in to comment.