Link.exe not found - But community edition not an option

I am working on a loaner laptop (windows) do to COVID-19. So I don't have my usual VS2019 tools.

We are not legally supposed to use VS Community edition on company equipment (we don't qualify as a 1000+ non-profit).

Just installed rust on the loaner, but I am getting this error on cargo build



error: could not compile `proc-macro2`.
warning: build failed, waiting for other jobs to finish...
error: linker `link.exe` not found
  |
  = note: The system cannot find the file specified. (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

error: could not compile `winapi`.

You should be able to just install the build tools instead of the entire VS IDE to get the linker.

1 Like

You do not need to pay for anything to use Rust in this way; the build tools are freely available.

Alternatively, if you cannot install VS build tools at all due to company politics or whatever reason, the mingw target works on Windows without any other dependency. (And, for the most part, just silently works. The exception is when linking native MSVC-compiled binaries.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.