Im currently porting a game from iOS to Android and compile Bullet without no problem... Everything work fine at the exception of 2 things:
1. Hinge Constraints simply doesn't work... But 6DOF or Ball work fine... I don't get it. As soon a rigid body collide another that is attached with an Hinge the object just get "detached" from the Hinge and fall through the ground. Very weird... Even if I set _btHingeConstraint->setAngularOnly( true );
2. All the g??? like gContactAddedCallback etc... doesn't get call at all... However, setOverlapFilterCallback work fine, as well as nearCallback.
This how I compile my static library using Android.mk:
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := bullet
LOCAL_C_INCLUDES = $(LOCAL_PATH)/../../../inc/bullet/
SRC_FILES = $(wildcard $(LOCAL_PATH)/../../../src/bullet/*.cpp)
SRC_FILES := $(SRC_FILES:$(LOCAL_PATH)/%=%)
LOCAL_SRC_FILES = $(SRC_FILES)
LOCAL_CFLAGS = -O3 -mno-thumb
LOCAL_CPPFLAGS = -O3 -mno-thumb
include $(BUILD_STATIC_LIBRARY)
I think theses oddities mentioned above are related with the compiler (Im missing a flag or two or something) cuz the same code compile and run fine on iOS (both simulator and device).
Anybody have experience something similar and/or find a fix?
TIA!
Bullet on Android NDK r5b
-
- Posts: 31
- Joined: Tue Jul 29, 2008 10:26 am
Re: Bullet on Android NDK r5b
To answer my own question, and for all of you who can compile successfully but got weird stuff happening, in your Application.mk add APP_STL := stlport_static (at least work for me
)
