Bullet and VC++ v9

iionaem
Posts: 2
Joined: Fri Aug 08, 2008 2:43 pm

Bullet and VC++ v9

Post by iionaem »

Hi,
I'm trying to use Bullet with MSVC++9 and I followed the instructions in the BUllet user manual but when I try to compile CcdPhysicsDemo I get:

Code: Select all

1>------ Build started: Project: appCcdPhysicsDemo, Configuration: Debug Win32 ------
1>Linking...
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: class btRigidBody * __thiscall DemoApplication::localCreateRigidBody(float,class btTransform const &,class btCollisionShape *)" (?localCreateRigidBody@DemoApplication@@QAEPAVbtRigidBody@@MABVbtTransform@@PAVbtCollisionShape@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::createStack(class btCollisionShape *,float,int,float)" (?createStack@CcdPhysicsDemo@@QAEXPAVbtCollisionShape@@MHM@Z)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btManifoldResult::btManifoldResult(class btCollisionObject *,class btCollisionObject *)" (??0btManifoldResult@@QAE@PAVbtCollisionObject@@0@Z) referenced in function "void __cdecl customNearCallback(struct btBroadphasePair &,class btCollisionDispatcher &,struct btDispatcherInfo &)" (?customNearCallback@@YAXAAUbtBroadphasePair@@AAVbtCollisionDispatcher@@AAUbtDispatcherInfo@@@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btManifoldResult::addContactPoint(class btVector3 const &,class btVector3 const &,float)" (?addContactPoint@btManifoldResult@@UAEXABVbtVector3@@0M@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "int gTotalContactPoints" (?gTotalContactPoints@@3HA)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btSphereShape::btSphereShape(float)" (??0btSphereShape@@QAE@M@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: void __thiscall btCompoundShape::addChildShape(class btTransform const &,class btCollisionShape *)" (?addChildShape@btCompoundShape@@QAEXABVbtTransform@@PAVbtCollisionShape@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btCompoundShape::btCompoundShape(void)" (??0btCompoundShape@@QAE@XZ) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(class btDispatcher *,class btBroadphaseInterface *,class btConstraintSolver *,class btCollisionConfiguration *)" (??0btDiscreteDynamicsWorld@@QAE@PAVbtDispatcher@@PAVbtBroadphaseInterface@@PAVbtConstraintSolver@@PAVbtCollisionConfiguration@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver(void)" (??0btSequentialImpulseConstraintSolver@@QAE@XZ) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btAxisSweep3::btAxisSweep3(class btVector3 const &,class btVector3 const &,unsigned short,class btOverlappingPairCache *)" (??0btAxisSweep3@@QAE@ABVbtVector3@@0GPAVbtOverlappingPairCache@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher@@QAE@PAVbtCollisionConfiguration@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration@@QAE@ABUbtDefaultCollisionConstructionInfo@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btCylinderShape::btCylinderShape(class btVector3 const &)" (??0btCylinderShape@@QAE@ABVbtVector3@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::initPhysics(void)" (?initPhysics@CcdPhysicsDemo@@QAEXXZ)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z) referenced in function "public: static void * __cdecl btConvexShape::operator new(unsigned int)" (??2btConvexShape@@SAPAXI@Z)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall btPolyhedralConvexShape::btPolyhedralConvexShape(void)" (??0btPolyhedralConvexShape@@QAE@XZ) referenced in function "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb@btBoxShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btBoxShape@@UBEXMAAVbtVector3@@@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow@btConvexInternalShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z) referenced in function "public: virtual void __thiscall btBoxShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btBoxShape@@UAEXABVbtVector3@@@Z)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z) referenced in function "public: static void __cdecl btConvexShape::operator delete(void *)" (??3btConvexShape@@SAXPAX@Z)
1>main.obj : error LNK2001: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)
1>CcdPhysicsDemo.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)
1>CcdPhysicsDemo.obj : error LNK2019: unresolved external symbol "public: void __thiscall btCollisionWorld::removeCollisionObject(class btCollisionObject *)" (?removeCollisionObject@btCollisionWorld@@QAEXPAVbtCollisionObject@@@Z) referenced in function "public: void __thiscall CcdPhysicsDemo::exitPhysics(void)" (?exitPhysics@CcdPhysicsDemo@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "int __cdecl glutmain(int,char * *,int,int,char const *,class DemoApplication *)" (?glutmain@@YAHHPAPADHHPBDPAVDemoApplication@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall DemoApplication::DemoApplication(void)" (??0DemoApplication@@QAE@XZ) referenced in function "public: __thiscall CcdPhysicsDemo::CcdPhysicsDemo(void)" (??0CcdPhysicsDemo@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::updateCamera(void)" (?updateCamera@DemoApplication@@UAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::clientResetScene(void)" (?clientResetScene@DemoApplication@@UAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::keyboardCallback(unsigned char,int,int)" (?keyboardCallback@DemoApplication@@UAEXEHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::specialKeyboard(int,int,int)" (?specialKeyboard@DemoApplication@@UAEXHHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::specialKeyboardUp(int,int,int)" (?specialKeyboardUp@DemoApplication@@UAEXHHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::reshape(int,int)" (?reshape@DemoApplication@@UAEXHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::mouseFunc(int,int,int,int)" (?mouseFunc@DemoApplication@@UAEXHHHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::mouseMotionFunc(int,int)" (?mouseMotionFunc@DemoApplication@@UAEXHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::renderme(void)" (?renderme@DemoApplication@@UAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DemoApplication::~DemoApplication(void)" (??1DemoApplication@@UAE@XZ) referenced in function "public: virtual __thiscall CcdPhysicsDemo::~CcdPhysicsDemo(void)" (??1CcdPhysicsDemo@@UAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall GLDebugDrawer::GLDebugDrawer(void)" (??0GLDebugDrawer@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'gDebugDrawer''(void)" (??__EgDebugDrawer@@YAXXZ)
1>..\..\DebugCcdPhysicsDemo.exe : fatal error LNK1120: 37 unresolved externals
1>Build log was saved at "file://c:\Projects\Projects_MW\CollisionEngine\bullet-2.69\out\debug8\build\appCcdPhysicsDemo\BuildLog.htm"
1>appCcdPhysicsDemo - 39 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I'm guessing that I haven't linked to soemthing or downloaded something. Do I need GLUT? A newer version of OpenGl? I'm on WinXP.


Thanks,
iio
Mars_999
Posts: 25
Joined: Tue Dec 04, 2007 7:48 pm

Re: Bullet and VC++ v9

Post by Mars_999 »

My guess is if you are using a .lib file it needs to be rebuilt for VC++9?
Syriven
Posts: 3
Joined: Sat Aug 09, 2008 5:38 am

Re: Bullet and VC++ v9

Post by Syriven »

I am having the same problem, and am not using a .lib file.
iionaem
Posts: 2
Joined: Fri Aug 08, 2008 2:43 pm

Re: Bullet and VC++ v9

Post by iionaem »

Syriven wrote:I am having the same problem, and am not using a .lib file.

Ok I ran the main demo file, forget its name, and all the demos worked properly except one but I'm nott too fussed. I think it is wk???.sln. Maybe you could try that.

So does that mean I can now start making calls to the Bullet libraries from my app?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet and VC++ v9

Post by Erwin Coumans »

When you open the msvc\8\wksbullet.sln solution file, it should all compile, link and run fine.

Thanks,
Erwin
Syriven
Posts: 3
Joined: Sat Aug 09, 2008 5:38 am

Re: Bullet and VC++ v9

Post by Syriven »

Okay... I am sure that I'm just doing something wrong with VC++; I'm new to it (Not at all to mean I'm new to C++ in general. I've recently switched from dev c++). I have tried and tried really hard to figure out what I'm doing wrong but absolutely cannot.

Yes, when I open the solution it does work fine. But here's where my lack of knowledge of VC++ comes in--How do I go about making my own project using Bullet? Do I use that solution and just add another project to it? If so, what do I change the settings in the project to get it to compile? I've made a new project under the solution, copied the source code of appHelloWorld into a source file in the new project, and tried to run it, but it gives me errors like this:

Code: Select all

1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall btCollisionWorld::removeCollisionObject(class btCollisionObject *)" (?removeCollisionObject@btCollisionWorld@@QAEXPAVbtCollisionObject@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btSphereShape::btSphereShape(float)" (??0btSphereShape@@QAE@M@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btRigidBody::btRigidBody(struct btRigidBody::btRigidBodyConstructionInfo const &)" (??0btRigidBody@@QAE@ABUbtRigidBodyConstructionInfo@0@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(class btDispatcher *,class btBroadphaseInterface *,class btConstraintSolver *,class btCollisionConfiguration *)" (??0btDiscreteDynamicsWorld@@QAE@PAVbtDispatcher@@PAVbtBroadphaseInterface@@PAVbtConstraintSolver@@PAVbtCollisionConfiguration@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver(void)" (??0btSequentialImpulseConstraintSolver@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btAxisSweep3::btAxisSweep3(class btVector3 const &,class btVector3 const &,unsigned short,class btOverlappingPairCache *)" (??0btAxisSweep3@@QAE@ABVbtVector3@@0GPAVbtOverlappingPairCache@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher@@QAE@PAVbtCollisionConfiguration@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration@@QAE@ABUbtDefaultCollisionConstructionInfo@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z) referenced in function "public: static void * __cdecl btCollisionObject::operator new(unsigned int)" (??2btCollisionObject@@SAPAXI@Z)
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z) referenced in function "public: static void __cdecl btCollisionObject::operator delete(void *)" (??3btCollisionObject@@SAXPAX@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btPolyhedralConvexShape::btPolyhedralConvexShape(void)" (??0btPolyhedralConvexShape@@QAE@XZ) referenced in function "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb@btBoxShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btBoxShape@@UBEXMAAVbtVector3@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow@btConvexInternalShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z) referenced in function "public: virtual void __thiscall btBoxShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btBoxShape@@UAEXABVbtVector3@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)
1>C:\Documents and Settings\logan\Desktop\bullet-2.69\msvc\8\Debug\Builda 2.exe : fatal error LNK1120: 18 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\logan\Desktop\bullet-2.69\msvc\Builda 2\Debug\BuildLog.htm"
1>Builda 2 - 19 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 45 up-to-date, 0 skipped ==========
I am so totally lost and I'm not at all sure I'm even going in the right direction. I know this probably isn't really a question about bullet so much as it is about VC++, but I would absolutely love any help at all.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet and VC++ v9

Post by Erwin Coumans »

You have to add the Bullet libraries as dependency to your project (right click, project dependencies).

Hope this helps,
Erwin
Syriven
Posts: 3
Joined: Sat Aug 09, 2008 5:38 am

Re: Bullet and VC++ v9

Post by Syriven »

But the Bullet doesn't have any libraries... When I open the lib folder, it has a readme that says this:

At the moment there are no binary packages from Bullet library.
Once this is done, 3 libraries will be placed here:
bulletmath.a
bulletcollision.a
bulletdynamics.a

The C-API will be available in the include folder.

For now, there is only C++ files, see src/btBulletCollisionCommon.h and src/btBulletDynamicsCommon.h

http://bullet.sf.net
Erwin Coumans