Box2d Android

Box2d Android
0.0 0



I am struggling to determine how to enable Box2D in my android project and disable Chipmunk. When I try running I am encountering an error originating in PhysicsSprite.cpp

#error “Either Chipmunk or Box2d should be enabled, but not both at the same time”

I am not sure where CC_ENABLE_CHIPMUNK_INTEGRATION is being defined, but it is not anywhere in my project code. In I have

APP_CPPFLAGS := -frtti -DCC_ENABLE_BOX2D_INTEGRATION=1 -DUSE_BOX2D -DCOCOS2D_DEBUG=1 -std=c++11 -Wno-literal-suffix

In I am not including chipmunk, but the Box2D module:

 LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
 LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static


 $(call import-module,cocos2dx)
 $(call import-module,cocos2dx/platform/third_party/android/prebuilt/libcurl)
 $(call import-module,CocosDenshion/android)
 $(call import-module,extensions)
 $(call import-module,external/Box2D)

How can I disable the chipmunk integration?

Any help appreciated


Ok, I had to actually edit ./extensions/ to set the appropriate flags, but not sure if that is the intended solution


Could you please paste a tutorial how to configure sample TestCPP project so Box2D could work?


Hi, unfortunately I don’t have working box2D. I give up and I am still using chipmunk2D in cocos2d-x