Closed eduardodoria closed 3 months ago
Thanks for the write up.
Shouldn't the application exit if it is out of memory?
Isn't the break point a property of the compiler?
These modifications I did is working.
I've got many errors before:
allocate.c:71:14: error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
void* ptr = aligned_alloc( B2_ALIGNMENT, size32 )
After that I got "Unsupported CPU" error.
And after that, B2_BREAKPOINT
is not defined.
I have not tested the possible implications that these changes may cause. But in my engine I updated to the Box2D "main" version (I also had more errors with 3.0.0 ) and needed to make these changes quickly.
You can look my workflow from Android: https://github.com/supernovaengine/supernova/actions/runs/10624088233/job/29451747819
Fixed in #783
I had to modify some parts to build for Android.
In file
allocate.c
the functionaligned_alloc
is only supported starting from Android API level 28, so I'm usingposix_memalign
instead:In file
core.h
I modified this part to compile for x86 and arm (maybe need to renameB2_CPU_X64
macro):At same
core.h
file I needed to addB2_BREAKPOINT
macro to Android: