Problem with including the Bullet Libraries..

Xorms
Posts: 3
Joined: Sat Jun 23, 2007 3:55 pm

Problem with including the Bullet Libraries..

Post by Xorms »

Hello,
I have a problem with including the bullet library correctly. :(

If i try to compile vehicleDemo.cpp i get the following message.

Code: Select all

/home/username/bullet/bullet-libs/libLibBulletDynamics.a(btDiscreteDynamicsWorld.o): In function `btDiscreteDynamicsWorld::addRigidBody(btRigidBody*)':
btDiscreteDynamicsWorld.cpp:(.text+0x699): undefined reference to `btCollisionWorld::addCollisionObject(btCollisionObject*, short, short)'
(full log)

I am using KDevelop. After running make i copied the .a files to:
/home/username/bullet/bullet-libs
I added this path with -L/home/username/bullet/bullet-libs to the LDFlags.
After that i added the Libs to the CXXFlags:
-lLibBulletCollision -lLibBulletDynamics -lLibLinearMath -lLibOpenGLSupport

At last i added the Directories with the .h files to my include folders:
-I/home/username/bullet/bullet-2.53
-I/home/username/bullet/bullet-2.53/src
-I/home/username/bullet/bullet-2.53/Demos/OpenGL

Can someone help me and tell me what i did wrong (im not so familiar with C++)? :(
Sorry for my poor english.

thanks Xorms
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

-lLibBulletCollision -lLibBulletDynamics -lLibLinearMath -lLibOpenGLSupport

the order (dependencies) should be dynamics,collision,math:

-lLibBulletDynamics -lLibBulletCollision --lLibLinearMath -lLibOpenGLSupport

Hope this helps,
Erwin
Xorms
Posts: 3
Joined: Sat Jun 23, 2007 3:55 pm

Post by Xorms »

Thanks :)

I changed the order and it looks much better now. But there is still one problem: :?

Code: Select all

/home/username/bullet/bullet-libs/libLibOpenGLSupport.a(DemoApplication.o): In function `DemoApplication::mouseFunc(int, int, int, int)':
DemoApplication.cpp:(.text+0x2b39): undefined reference to `btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody&, btVector3 cons
(full log)


Xorms
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

-lLibOpenGLSupport -lLibBulletDynamics -lLibBulletCollision --lLibLinearMath

OpenGLSupport uses mouse picking (using a btPoint2PointConstraint) from LibBulletDynamics, so it depends on that. That means it should go first. Please try that.

Thanks,
Erwin
Xorms
Posts: 3
Joined: Sat Jun 23, 2007 3:55 pm

Post by Xorms »

Ah. Looks like it works fine now.
Thanks a lot :)