Hi guys,
I'm trying to setup a project targeting x86_64-pc-windows-msvc
; however, I'm not even getting started. I can get it working targeting
x86_64-pc-windows-gnu
, so I think there's probably something I'm missing that I'm not aware of, but I can't figure out what.
I've setup probably the simplest test case to show where it's failing:
C:\Users\Charles\Repos>cargo new test
C:\Users\Charles\Repos>cd test
C:\Users\Charles\Repos\test>cargo build
Compiling test v0.1.0 (file:///C:/Users/Charles/Repos/test)
C:\Users\Charles\Repos\test>cargo build --target x86_64-pc-windows-msvc --verbose
Compiling test v0.1.0 (file:///C:/Users/Charles/Repos/test)
Running `rustc src\lib.rs --crate-name test
--crate-type lib -g
--out-dir C:\Users\Charles\Repos\test\target\x86_64-pc-windows-msvc\debug
--emit=dep-info,link
--target x86_64-pc-windows-msvc -L dependency=C:\Users\Charles\Repos\test\target\x86_64-pc-windows-msvc\debug -L dependency=C:\Users\Charles\Repos\test\target\x86_64-pc-windows-msvc\debug\deps`
src\lib.rs:1:1: 1:1 error: can't find crate for `std`
src\lib.rs:1 #[test]
^
error: aborting due to previous error
Could not compile `test`.
Caused by:
Process didn't exit successfully: `rustc src\lib.rs
--crate-name test
--crate-type lib -g
--out-dir C:\Users\Charles\Repos\test\target\x86_64-pc-windows-msvc\debug
--emit=dep-info,link
--target x86_64-pc-windows-msvc -L dependency=C:\Users\Charles\Repos\test\target\x86_64-pc-windows-msvc\debug -L dependency=C:\Users\Charles\Repos\test\target\x86_64-pc-windows-msvc\debug\deps` (exit code: 101)
I verified my path does include cl.exe
here: ;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64
. I've also tried with the current Stable and Beta Rust versions, getting the same results (installed to default locations).
Any ideas?