Hi,
Box2d failed to build with error LNK2019: unresolved external symbol _aligned_alloc referenced in function _b2Alloc and error C3861: 'aligned_alloc': identifier not found on windows with MSVC target X86, it can be reproduced on latest version df7373c on main branch. Are builds targeting X86 no longer supported? Could you please help look at this issue? Thanks in advance.
Note: it can build pass on target X64.
Steps to reproduce the behavior:
- git clone https://github.com/erincatto/box2d C:\gitP\erincatto\box2d
- Open a VS2022 x86 cmd
- cd C:\gitP\erincatto\box2d && mkdir build_x86 && cd C:\gitP\erincatto\box2d\build_x86
- set CL=/wd4047
- cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 ..
- msbuild /m /p:Platform=Win32 /p:Configuration=Release box2d.sln /t:Rebuild
Error Log:
Build.log
ErrorMessage:
8>box2d.lib(core.obj) : error LNK2019: unresolved external symbol _aligned_alloc referenced in function _b2Alloc [C:\gitP\erincatto\box2d\build_x86\test\test.vcxproj]
...
C:\gitP\erincatto\box2d\samples\main.cpp(74,14): error C3861: 'aligned_alloc': identifier not found [C:\gitP\erincatto\box2d\build_x86\samples\samples.vcxproj]