2

I am trying to compile x64 on Windows with Rust.

I have set: rustup default stable-x86_64-pc-windows-msvc

With the following program

fn main() { println!("{}", std::usize::MAX); }

cargo run prints out 4294967295

but cargo run --target --target x86_64-pc-windows-msvc gives me:

error[E0463]: can't find crate for 'std'
  |
  = note: the 'x86_64-pc-windows-msvc' target may not be installed

Also x86_64-pc-windows-msvc is in rustc --print target-list

I have no idea what to do...

2 Answers 2

4

This was fixed by uninstalling a rust nightly build found using rustc --print sysroot and reinstalling latest stable build.

Sign up to request clarification or add additional context in comments.

Comments

-1

The answer is in the note section of the error message:

   = note: the 'x86_64-pc-windows-msvc' target may not be installed

To f

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.