Building 2.81 for iOS - having issues.
Posted: Tue Dec 18, 2012 11:35 am
Hi!
I ran into some troubles when I tried building Bullet for iOS.
What I did was to add all the sources from BulletCollision, BulletDynamics, vectormath and LinearMath to my iOS project (for easy debugging and patching)
My first issue was an invalid preprocessor instruction in btScalar.h, there was a line called "#end", but there seems to be no #end instruction in the preprocessor.
After trying to decrypt the header file, I concluded this #end could just be removed, and after doing this everything compiled fine.
Is this correct or am I misunderstanding something?
Is it a typo or is #end supposed to do something?
My second issue was when trying to enable NEON.
the __armv7__ macro was not defined, so no NEON code was enabled at first.
I added "|| defined(__ARM_ARCH_7S__)" and then NEON code is enabled.
But it does not compile.
I get several "Constant expression evaluates to 4294967295 which cannot be narrowed to type 'int32_t' (aka 'int')" and "Constant expression evaluates to -1 which cannot be narrowed to type 'int32_t' (aka 'int')".
Here is an example of a line that fails with the first message (L68, btVector3.h):
"const int32x4_t ATTRIBUTE_ALIGNED16(btvFFF0Mask) = (int32x4_t){0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0};"
XCode suggests to fix it with an explicit typecast, but I feel unsure if this is the right approach.
Anyone who can advice?
Am I just messing things up, not using the cmake system, or is the iOS build slightly broken in 2.81?
btScalar.h looks quite messy in the iOS definitions, with a couple of redundant #ifdefs
I ran into some troubles when I tried building Bullet for iOS.
What I did was to add all the sources from BulletCollision, BulletDynamics, vectormath and LinearMath to my iOS project (for easy debugging and patching)
My first issue was an invalid preprocessor instruction in btScalar.h, there was a line called "#end", but there seems to be no #end instruction in the preprocessor.
After trying to decrypt the header file, I concluded this #end could just be removed, and after doing this everything compiled fine.
Is this correct or am I misunderstanding something?
Is it a typo or is #end supposed to do something?
My second issue was when trying to enable NEON.
the __armv7__ macro was not defined, so no NEON code was enabled at first.
I added "|| defined(__ARM_ARCH_7S__)" and then NEON code is enabled.
But it does not compile.
I get several "Constant expression evaluates to 4294967295 which cannot be narrowed to type 'int32_t' (aka 'int')" and "Constant expression evaluates to -1 which cannot be narrowed to type 'int32_t' (aka 'int')".
Here is an example of a line that fails with the first message (L68, btVector3.h):
"const int32x4_t ATTRIBUTE_ALIGNED16(btvFFF0Mask) = (int32x4_t){0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0};"
XCode suggests to fix it with an explicit typecast, but I feel unsure if this is the right approach.
Anyone who can advice?
Am I just messing things up, not using the cmake system, or is the iOS build slightly broken in 2.81?
btScalar.h looks quite messy in the iOS definitions, with a couple of redundant #ifdefs