How do I resolve Windows Kits related errors for ARM64 in Visual Studio 2019?

141 Views Asked by At

I'm migrating a project from X64 to native ARM64. As I build the project after changing the config settings to ARM64, I see the following errors which otherwise produced clean build in X64 config.

1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winbase.h(9736,32): error C2065: 'InterlockedIncrement64': undeclared identifier
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winbase.h(9747,28): error C3861: '_InterlockedDecrement': identifier not found
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winbase.h(9846,28): error C3861: '_InterlockedExchangeAdd': identifier not found
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winbase.h(9858,31): error C3861: 'InterlockedExchangeAdd64': identifier not found
3>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h(8752,19): error C3861: 'ReadNoFence8': identifier not found
3>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h(8763,21): error C3861: 'ReadAcquire8': identifier not found
3>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h(8774,21): error C3861: 'ReadNoFence8': identifier not found
3>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h(8807,5): error C3861: 'WriteRelease8': identifier not found
3>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h(8820,5): error C3861: 'WriteNoFence8': identifier not found

I use Visual Studio 2019 Professional & the following are the packages I installed for supporting the ARM64 config:

.NET Framework 4.8.1, which has ARM64 support.
C++ Universal Windows Platform Support for v142 build tools (ARM64)
C++/CLI support for v142 build tools (Latest)
MSVC v142 - VS 2019 C++ ARM64 build tools (Latest)
C++ ATL for latest v142 build tools (ARM64)
C++ MFC for latest v142 build tools (ARM64)

I haven't used those APIs in my project, but unable to find why I get those errors. Please help me resolve this issue. Thanks.

1

There are 1 best solutions below

5
On

Refer to the Doc:Get started with Arm64 Visual Studio

To get started with the native Arm64 Visual Studio experience:

1,Ensure you have an Arm64 device with Windows 11.

2,Uninstall any prior versions of Visual Studio from your Arm64 device.

3,Download and install the latest version Visual Studio 2022.

I suggest you could try to use Visual Studio 2022 instead of Visual Studio 2019.