More issues with Linking in VS2010

ireg
Posts: 3
Joined: Thu Feb 17, 2011 8:38 pm

More issues with Linking in VS2010

Post by ireg »

I am new to bullet and I'm trying to get a Hello World project of sorts started. I am working with Visual Studio 2010 (possibly 64 bit but not sure) in Windows 7 x64bit. I followed the steps given in the wiki, but when compiling I get a bunch of unresolved external symbol errors, attached below. I did a search on the forum and it looks like several other people have had similar issues. I've tried various solutions but nothing has worked so far.

I've already checked that the Link Library Dependencies option in the project properties page is set to Yes. I've also manually added BulletCollision.lib, BulletDynamics.lib, and LinearMath.lib into the project, and added that folder to the "%bullet_dir%\msvc\2010\lib\Release" folder to the additional libraries directory option. Nothing helped.

I can't figure out what I'm doing wrong. My hunch is that it might be an issue of mismatch between using 32bit vs 64bit features somewhere, but I don't know where to look.

1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall btConvexShape::~btConvexShape(void)" (??1btConvexShape@@UAE@XZ)
1>PhysicsDemos.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>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "protected: __thiscall btConvexInternalShape::btConvexInternalShape(void)" (??0btConvexInternalShape@@IAE@XZ)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btDbvtBroadphase::btDbvtBroadphase(class btOverlappingPairCache *)" (??0btDbvtBroadphase@@QAE@PAVbtOverlappingPairCache@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration@@QAE@ABUbtDefaultCollisionConstructionInfo@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher@@QAE@PAVbtCollisionConfiguration@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver(void)" (??0btSequentialImpulseConstraintSolver@@QAE@XZ)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(class btDispatcher *,class btBroadphaseInterface *,class btConstraintSolver *,class btCollisionConfiguration *)" (??0btDiscreteDynamicsWorld@@QAE@PAVbtDispatcher@@PAVbtBroadphaseInterface@@PAVbtConstraintSolver@@PAVbtCollisionConfiguration@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btStaticPlaneShape::btStaticPlaneShape(class btVector3 const &,float)" (??0btStaticPlaneShape@@QAE@ABVbtVector3@@M@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: __thiscall btRigidBody::btRigidBody(struct btRigidBody::btRigidBodyConstructionInfo const &)" (??0btRigidBody@@QAE@ABUbtRigidBodyConstructionInfo@0@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)
1>PhysicsDemos.obj : 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)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btSphereShape@@UBEXMAAVbtVector3@@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btSphereShape@@UBE?AVbtVector3@@ABV2@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertexWithoutMargin(class btVector3 const &)const " (?localGetSupportingVertexWithoutMargin@btSphereShape@@UBE?AVbtVector3@@ABV2@@Z)
1>PhysicsDemos.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(class btVector3 const *,class btVector3 *,int)const " (?batchedUnitVectorGetSupportingVertexWithoutMargin@btSphereShape@@UBEXPBVbtVector3@@PAV2@H@Z)
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: More issues with Linking in VS2010

Post by EnlightenedOne »

Take a look here http://bulletphysics.org/Bullet/phpBB3/ ... f=9&t=5621 I had the same issues. I am using 64bit windows 7 and I am using VS2010 you will find so long as your trying to compile an x86 program no issues come up from that.

Have you added the additional dependencies in the linkers additional dependencies? Perhaps give a show of your layout, do take a look at how my config looked there are pictures on there and basically the same 20 odd linker errors :p