Raki
Raki

Reputation: 329

Building Bullet Physics library with Android NDK

I'm trying to incorporate physics effects for my rendering engine(C++,Android,iOS) using Bullet Physics. For Android platform I'm using CMake to build cpp libs with ndk. When I add the bullet libs(Bullet Collision,dynamics and linearmath) as target_link_libraries for my graphicsEngine lib, my Android App is loosing its debugging capability in AndroidStudio. My doubt is something wrong with the way im building my bullet libs. I can see generated libs libBulletCollision.so..etc.. in the following path.

build\intermediates\transforms\stripDebugSymbol\google\debug\0\lib\armeabi-v7a

Any help or suggestion appreciated..

Folder structure for CMakeLists of BulletPhysics

cpp------
--BulletInclude-----
----BulletCollision-
----BulletDynamics--
----LinearMath------
----CMakeLists.txt
--GLEngine----------
--CMakeLists.txt

Each folder in BulletInclude has a CMakeLists.txt with the following structure

ADD_LIBRARY(libname 
            SHARED
            required cpp files)
TARGET_LINK_LIBRATIES(libname otherlibname)

Upvotes: 1

Views: 918

Answers (1)

Raki
Raki

Reputation: 329

In my case for Android App, using cmake, I built my a)Rendering Engine lib b)Bullet phyiscs libs. Then added bullet physics libs as dependent libs to my Rendering Engine lib. Because of these steps my Android App is unable to debug my cpp code.

So...

I added total Bullet Physics source code to my rendering engine, then I could debug my cpp code of my Android App normally.

I am still not clear what was the issue, whether it was with

1)cmake build issue
2)lldb of android studio
3) or some other..

I hope my approach will help some others..

Upvotes: 1

Related Questions