Page 1 of 1

irrBullet linker error?

Posted: Thu Jun 09, 2011 4:02 am
by RageD
Hey everyone,

So I am attempting to integrate bullet physics into my project using irrBullet, however, I am getting an odd exception.

Code: Select all

1>irrBullet.lib(softbody.obj) : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::appendAnchor(int,class btRigidBody *,bool)" (?appendAnchor@btSoftBody@@QAEXHPAVbtRigidBody@@_N@Z) referenced in function "public: void __thiscall ISoftBody::appendAnchor(unsigned int,class IRigidBody * const,bool)" (?appendAnchor@ISoftBody@@QAEXIQAVIRigidBody@@_N@Z)
1>..\..\bin\Client.exe : fatal error LNK1120: 1 unresolved externals
I get the same error with both debug and release libraries. Projects (both my bullet and irrBullet libraries and current project) are being built with MDd and MD settings (should I use MT/d?).

Anyway, I am linking them in this order exactly:

Code: Select all

#pragma comment(lib, "../../libs/irrBullet-0.1.71/lib/win32_visualstudio/2010/Debug/irrBullet.lib")
#pragma comment(lib, "../../libs/bullet-2.7.8/lib/Debug/BulletSoftBody.lib")
#pragma comment(lib, "../../libs/bullet-2.7.8/lib/Debug/BulletDynamics.lib")
#pragma comment(lib, "../../libs/bullet-2.7.8/lib/Debug/GIMPACTUtils.lib")
#pragma comment(lib, "../../libs/bullet-2.7.8/lib/Debug/BulletCollision.lib")
#pragma comment(lib, "../../libs/bullet-2.7.8/lib/Debug/LinearMath.lib")
So without all the extension info, it looks like this:

Code: Select all

irrBullet.lib
BulletSoftBody.lib
BulletDynamics.lib
GIMPACTUtils.lib
BulletCollision.lib
LinearMath.lib
I have gotten this ordering from another post on the forum here (I tried the ordering provided in the irrBullet documentation, and received the same error).

I have rebuilt the libraries several time, but can't seem to get it working.

Anyone else having this issue and/or know how to fix it? Thanks for your help.

-RageD

Posted: Thu Jun 09, 2011 9:31 am
by REDDemon
Wasn't IrrBullet compiled with C::B? I'll check this..

EDIT:

now there is also VS support. great. I don't have VS2010. so I can't help. Try to ask that question to cobra. He's the developer of IrrBullet. You can also try Bullet without irrbullet.

Posted: Thu Jun 09, 2011 12:44 pm
by RageD
Thanks for your help. Yes, I compiled the binaries myself for both bullet and irrBullet.

Perhaps I will look into using it without irrBullet - the wrapper just seemed convenient :P

-RageD

Posted: Thu Jun 09, 2011 3:48 pm
by RageD
After some sleep, it dawned on me what the problem is... It's a linker error, meaning something isn't defined.

I checked the Bullet-2.78 source and realized that the function signatures did not match those in irrBullet. So it seems (comparing Bullet-2.77 source), that the latest source version that irrBullet supports is Bullet-2.77.

I did try simply replacing the header files for Bullet-2.78 (since they are parametized, it compiles properly), but this causes an assertion failure.

I am attempting to build the Bullet-2.77 libs right now and see what happens.

-RageD

EDIT: I receive the same assertion failure in the same place with the 2.77 sources; however, the problem is not the libraries - it's how I am trying to load the mesh. I am attempting to load (the default) quake3 map mesh as a

Code: Select all

IBvhTriangleMeshShape*
but it doesn't like that too much :P