Bullet compile error

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Nash94
Posts: 20
Joined: Fri Aug 31, 2012 3:21 pm

Bullet compile error

Post by Nash94 »

Im trying to run this demo for bullet found here
http://www.irrlicht3d.org/wiki/index.ph ... WithBullet
I've linked all the Bullet includes and IIrlicht includes and get no errors in the code but, when i run debug it fails with errors..

"Error 20 error LNK2001: unresolved external symbol __imp__createDevice C:\Users\Home\documents\visual studio 2010\Projects\object\object\main.obj object"

"Error 26 error LNK2001: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z) C:\Users\Home\documents\visual studio 2010\Projects\object\object\main.obj object"

"Error 22 error LNK2001: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z) C:\Users\Home\documents\visual studio 2010\Projects\object\object\main.obj object"

"Error 15 error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb@btSphereShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z) C:\Users\Home\documents\visual studio 2010\Projects\object\object\main.obj object"

and so on with 28 of them, any idea on what ive done wrong?
codetiger
Posts: 103
Joined: Wed May 02, 2012 9:24 am
Location: Chennai, India
Contact:

Re: Bullet compile error

Post by codetiger »

Bullet library is not loaded properly.
IrrNaCl - Irrlicht Port for Google Chrome Native Client - Demo

Iyan 3D - Make your own 3d animation using your iOS Device
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Bullet compile error

Post by hybrid »

Linker errors are not expected during running the application, but after compilation of the single cpp files during link phase. It looks like you compiled all files properly, but did not add the libraries for linking. Please re-read all documents and add Irrlicht and bullet libraries accordingly.
Nash94
Posts: 20
Joined: Fri Aug 31, 2012 3:21 pm

Re: Bullet compile error

Post by Nash94 »

The link i posted says this,
"You need to specify to your IDE's linker the libBulletDynamics, libBulletCollision, and libLinearMath libraries."
although i cannot find files with the same name, and the lib folder is empty I linked the srcs as the include and lib folder.
This lets all the code in complier work, however not build. I also tried including the main directory the one above source and tried coping all the .dll files in Bullet to my release folder in project directory. Nothing seems to work and i cant seem to find what i've missed. Is there anyone with experience with bullet n VS?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Bullet compile error

Post by hybrid »

No, you have to include the .lib files usually. You need those to build applications with bullet. Otherwise you have to recompile bullet to get the files.
Nash94
Posts: 20
Joined: Fri Aug 31, 2012 3:21 pm

Re: Bullet compile error

Post by Nash94 »

Hmm, yes you are right i have rebuilt and got the .lib files now, something else i am trying was using the demos and replacing the main with this code.
The demos build just fine and work and are all linked, so i replaced one of them linked it up to irrlicht and copied the .dll ect.. however i still get an error although from 28 errors down to 1..

Code: Select all

Error   1   error LNK2019: unresolved external symbol __imp__createDevice referenced in function _main  C:\Users\Home\Desktop\bullet-2.80-rev2531\bullet-2.80-rev2531\msvc\vs2010\main.obj  App_BasicDemo
Figured it out..
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Bullet compile error

Post by hybrid »

Yeah, this is the Irrlicht library. Seems like you don't link against Irrlicht.lib or chose the wrong version (you should use the win32-msvc I suppose)
Post Reply