Box2d failed to build with "error C3861: '__rdtsc': identifier not found" on Windows arm64 with MSVC
The MSVC team regularly builds popular open-source projects, including yours, with development versions of the build tools in order to find and fix regressions in the compiler and libraries before they can ship and cause trouble for the world. This also allows us to provide advance notice of breaking changes, which is the case here.
Box2d failed to build with "error C3861: '__rdtsc': identifier not found" on Windows arm64 with MSVC. Could you please help to take a look at this? Thanks in advance!
Repro steps:
- Open VS2022 x64 CMD
- "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
- git clone https://github.com/erincatto/box2d C:\gitP\erincatto\box2d
- cd /d C:\gitP\erincatto\box2d
- mkdir build_arm64 && cd build_arm64
- set CL=/wd4098
- cmake -G "Visual Studio 17 2022" -A arm64 -DCMAKE_SYSTEM_VERSION=10.0.26100.0 ..
- msbuild /m /p:Platform=arm64 /p:Configuration=Release box2d.sln /t:Rebuild
Error info: C:\gitP\erincatto\box2d\samples\sample_benchmark.cpp(1736,27): error C3861: '__rdtsc': identifier not found [C:\gitP\erincatto\box2d\build_arm64\samples\samples.vcxproj] C:\gitP\erincatto\box2d\samples\sample_benchmark.cpp(1745,25): error C3861: '__rdtsc': identifier not found [C:\gitP\erincatto\box2d\build_arm64\samples\samples.vcxproj]
Test log file: Build (35).log
I never tried to build MSVC for Arm. Unfortunately I don't have access to hardware capable of testing it.
Closing this due to lack of reply.