Reputation: 31
I am getting link.exe not found issue , is there anything more i have to install?
PS C:\Users\parik> cargo new test2 Created binary (application)
test2
project PS C:\Users\parik> cargo build error: could not findCargo.toml
inC:\Users\parik
or any parent directory PS C:\Users\parik> cd test2 PS C:\Users\parik\test2> cargo build Compiling test2 v0.1.0 (C:\Users\parik\test2) error: linkerlink.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 foundnote: please ensure that VS 2013, VS 2015 or VS 2017 was installed with the Visual C++ option
error: aborting due to previous error
error: Could not compile
test2
.
Upvotes: 2
Views: 4565
Reputation: 42879
There are two existing Rust toolchain families provided for Windows:
msvc is the default, and as you realized, depends on a recent Visual C++ installation.
gnu on the other hand depends on GNU/MinGW-w64. It can be installed and made the default toolchain using:
$ rustup default stable-x86_64-pc-windows-gnu
Upvotes: 11
Reputation: 211
Yes, you have to install VC+ build tools so that rustc should be able to autodetect the helper files. Or you can go with the VS 2013 or 2015(for autodetection). For more information please refer this.
Upvotes: 0