Hi, I recently finished a quick project and I wanted to share it with my friends. The problem is that they all run Windows while I'm on a M1 Mac. I used the cargo build --target=x86_64-pc-windows-gnu command, but then I got 747 error messages. Here's one of them:
error[E0425]: cannot find function `_mm256_setr_m128i` in this scope
--> /Users/oihandeshayes/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ppv-lite86-0.2.17/src/x86_64/sse2.rs:1698:39
|
1698 | ... u32x4x2_avx2::new(_mm256_setr_m128i(x.0[2].x, x.0[3].x)),
| ^^^^^^^^^^^^^^^^^ not found in this scope
Hello again. I just wanted to say that after a lot of googling, I discover this command:
rustup target add x86_64-pc-windows-msvc
I used it and now I have only one error:
Compiling guessing_game v0.1.0 (/Users/oihandeshayes/Desktop/myProjects/guessing_game)
warning: unused variable: `other`
--> src/main.rs:38:13
|
38 | other => {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_other`
|
= note: `#[warn(unused_variables)]` on by default
error: linker `link.exe` not found
|
= note: No such file or directory (os error 2)
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
note: VS Code is a different product, and is not sufficient.
warning: `guessing_game` (bin "guessing_game") generated 1 warning
error: could not compile `guessing_game` (bin "guessing_game") due to previous error; 1 warning emitted
I get that the necessary linker is missing, but where could I get it?
Docker would be good, but every time I try a docker command it prints this error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
EDIT: The docker commands now work, and I'v tried the cross project, but I now get this error:
Unable to find image 'ghcr.io/cross-rs/x86_64-pc-windows-gnu:0.2.5' locally
0.2.5: Pulling from cross-rs/x86_64-pc-windows-gnu
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'
while using the cross build --target x86_64-pc-windows-gnu command.