Linker errors on windows ARM host

Hi all,

I'm trying to get a Windows development environment setup and failing miserably. I'm using Windows 11 ARM inside a Parallels VM on my M2 Mac. Right now I'm simply trying to get a cargo hello world project to link and print hello world.

I've tried a ton of different things and all have failed. My best effort after figuring out how to install the MSVC ARM build tools is to initialize them like so:

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build>.\vcvarsarm64_arm.bat
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.9.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'arm64_arm'

Then when I cargo build my hello world project I get a huge list of linker errors: linker errors · GitHub

I found this thread but it didn't work to fix my issue: Unresolved external symbol {memcpy, memset, memmove, memcmp, strlen, __CxxFrameHandler, _CxxThrowException}.

One other odd thing I should mention is that if I rerun rustup-init.exe it gives me the warning that the build tools are not installed even though I know they are, so potentially something is not lining up correctly with the toolchain?

Does anyone have any ideas or know of any tutorial that for sure works?

Thanks,
Matt

Have you tried building a simple C program?

I don't know what to make of this but based on a random Stack Overflow comment I:

  1. Reinstalled the VM
  2. Installed build tools including ARM64 MSVC
  3. Rebooted
  4. Then installed rustup-init which identified build tools is installed.

Now a basic cargo hello world is working.

I'm exactly sure what rustup-init does to figure out the msvc environment but perhaps this part went haywire during the install somehow?

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.