[SOLVED]Building bullet extras

hynner

22-07-2011 18:04:27

hello every one, I am new to Ogre world and I am trying to build OgreBullet on Ubuntu 11.04, I can´t download deb package, it gives me some strange errors, but everything was good when i tried to build it from source, i just use autogen.sh configure make and make install, but when trying to build it i get error that ConvexBuilder.h cannot be found, so i searched and i found out that it is part of Bullet Extras,so i just copied it to the folder,but it seems i need to build bullet extras and thats what i just cannot find out how to do that. I build Bullet, but it didn´t build extras. So can anybody give me any advice on how to build extras, or any other way to get OgreBullet working? Thanks a lot and sorry for my English.

dermont

23-07-2011 09:56:15

You would probably be better of building bullet with the CMake files, omniyo wrote a guide here:

viewtopic.php?f=12&t=14193


cmake . -G "Unix Makefiles" -DBUILD_DEMOS=FALSE -DINSTALL_EXTRA_LIBS=TRUE
make -j4
sudo make install


Your problem with the tutorial (from the main forum), you can resolve by updating the OgreBullet_Collision_test.h header:


OgreBullet_Collision_testFrameListener(
SceneManager *sceneMgr,
RenderWindow* win,
Camera* cam,
Vector3 gravityVector,
AxisAlignedBox bounds)

hynner

23-07-2011 18:03:33

First of all thank you very mutch for your second advice. To the first thing, i followed the guide exactly, but I´am still getting errors when trying to build Ogre Bullet tutorial, /usr/local/lib/libOgreBulletCol.so: undefined reference to `btPolyhedralConvexShape::initializePolyhedralFeatures()'
/usr/local/lib/libOgreBulletDyn.so: undefined reference to `btAngularLimit::set(float, float, float, float, float)'
collect2: ld returned 1 exit status
so I want to ask whether it matter if i have my libConvexDecomposition and libGIMPACTUtils like static library(.a)? And second whether i need to specify the path to bullet/ogre libs/includes somewhere? Please note I´am not only the Ogre and Bullet n00b but linux n00b too:D I don´t know anything about makefiles at all.

dermont

24-07-2011 10:27:57

I haven't tried running against the static bullet libs, however you can build bullet shared libs by adding -DBUILD_SHARED_LIBS=TRUE to your bullet build command line (see bullet INSTALL).

What happens when you try to build the demo from the command line, something like:


g++ -o test OgreBullet_Collision_test.cpp -I. \
`pkg-config --cflags --libs OGRE OIS` `pkg-config --cflags OgreBullet bullet` \
/media/sda8/Libraries/Physics/bullet_static/lib/libOgreBulletDyn.a \
/media/sda8/Libraries/Physics/bullet_static/lib/libOgreBulletCol.a \
/media/sda8/Libraries/Physics/bullet_static/lib/libBulletDynamics.a \
/media/sda8/Libraries/Physics/bullet_static/lib/libBulletCollision.a \
/media/sda8/Libraries/Physics/bullet_static/lib/libLinearMath.a \
/media/sda8/Libraries/Physics/bullet_static/lib/libConvexDecomposition.a \
/media/sda8/Libraries/Physics/bullet_static/lib/libGIMPACTUtils.a


OR


g++ -o test OgreBullet_Collision_test.cpp -I.\
`pkg-config --cflags --libs OGRE OIS` `pkg-config --cflags OgreBullet bullet` \
-L/media/sda8/Libraries/Physics/bullet_static/lib \
-Wl,-static -lOgreBulletDyn -lOgreBulletCol -lBulletDynamics -lBulletCollision -lLinearMath -lConvexDecomposition -lGIMPACTUtils -Wl,-Bdynamic

hynner

24-07-2011 10:41:07

Does it matter if it cannot find OpenCL when running cmake command? PS: building from command line wasn´t successful due to including, and i really don´t want to rewrite all my includes into the bash :D
Edit: I´ve tried to build it with -DINSTALL_BUILD_SHARED_LIBS=TRUE, but no luck, still no shared libs for extras

hynner

24-07-2011 14:27:18

Finally solved, it was caused by bad library types of Bullet, you must link static Bullet libs but shared OgreBullet libs, thats the only configuration that works for me:D
Here is my Linker input to be perfectly clear:
/usr/lib/libOgreMain.so /usr/lib/libOIS.so /usr/local/lib/libOgreBulletCol.so /usr/local/lib/libOgreBulletDyn.so /usr/local/lib/libBulletCollision.a /usr/local/lib/libBulletDynamics.a /usr/local/lib/libLinearMath.a /usr/local/lib/libConvexDecomposition.a /usr/local/lib/libGIMPACTUtils.a