Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Dec 29, 2010 3:00 am 
Offline

Joined: Mon Dec 27, 2010 10:46 pm
Posts: 35
Sorry for all these noobish questions, but here comes another one :

Q : While compiling an irrlicht/bullet demo code I got from scavanging these forums I'm having these particular errors that show up in the debugger as :

Code:
-undefined reference to `btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btStackAlloc*, btPoolAllocator*, btPoolAllocator*)'|

undefined reference to `btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*)'|

undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&, float, float, float, float)'|

undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&, float, float, float, float)'|



these debugging errors output are associated with the following lines of codes :
(theses lines aren't following each other in the code, there's a gap of 100 lines in one case)
Code:
btDefaultCollisionConfiguration *CollisionConfiguration = new btDefaultCollisionConfiguration();
btBroadphaseInterface *BroadPhase = new btAxisSweep3(btVector3(-1000, -1000, -1000), btVector3(1000, 1000, 1000));
btRigidBody *RigidBody = new btRigidBody(TMass, MotionState, Shape, LocalInertia);
btRigidBody *RigidBody = new btRigidBody(TMass, MotionState, Shape, LocalInertia);



I've looked into the api and btRigidBody seem to be still there so I'm guess this isn't the problem...

idk if I forgot to include something, so far all I have included is :
(And it is included fine... AFAIK)
Code:
#include <irrlicht/irrlicht.h>
#include <bullet/btBulletCollisionCommon.h>
#include <bullet/btBulletDynamicsCommon.h>
#include <cstdlib>


...also, there are a lot of other bt stuff that works just fine, such as "btBroadphaseInterface" and "btCollisionDispatcher"... so I really don't know what's going on with these 4 particular lines.


So yea...
If anyone have any clue on what can cause these "undefined" errors thanks for sharing them.
I'm not new to play with debugging issues, but this one really makes me clueless on how to solve it...

Any help is welcome.


Top
 Profile  
 
PostPosted: Wed Dec 29, 2010 11:36 pm 
Offline

Joined: Tue Dec 09, 2008 10:12 am
Posts: 47
Did you linked the ".lib" or ".a" libraries.

Note that there is a specific order to these files.


Top
 Profile  
 
PostPosted: Thu Dec 30, 2010 4:55 pm 
Offline

Joined: Mon Dec 27, 2010 10:46 pm
Posts: 35
Well, thanks you very much for your interest OSasuke.

First off, beside my incapacity at creating these .a files from the downloadable source of bullet, I did succeed to find a built version of bullet 2.76 specially for minGW, thanks to these forums.

The current linkage order (if I can name it like that) is as follow :

libIrrlicht.dll.a
(That is the lib used to load Irrlicht 3D rendering engine)

libbulletCollision.a
libbulletDynamic.a
libbulletMath.a

I just linked bullet's lib in alphabetical order, is there a more appropriate order I should use ?


Top
 Profile  
 
PostPosted: Tue Jan 04, 2011 4:38 am 
Offline

Joined: Mon Jan 03, 2011 4:26 pm
Posts: 43
The ordering shouldn't matter, but I have mine linked in Dynamics, Collision, then Math


Top
 Profile  
 
PostPosted: Fri Jan 07, 2011 12:41 am 
Offline

Joined: Mon Dec 27, 2010 10:46 pm
Posts: 35
Well.

looks like the ordering did matter.

I have no idea why I haven't tried that sooner, but it seem to have solved these "undefined" errors.

Now the Hello world example seem to print a simulation on the console (but don't print hello :/ )

I think I should be happy...

hem... "yay, it seem to works"
...haha

PS : the ordering is indeed to PUT THE DARN "libBulletDynamics.a" LIB ON TOP OF ALL BULLET LIBS !!!11!!!!

IE : Dynamics, Collision, then Math as lulzfish said

PS : thanks a lot lulzfish


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group