Another one with Linker trouble.

Post Reply
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Another one with Linker trouble.

Post by EnlightenedOne »

Hello everyone! I am a game developer who just decided I cant manage physics on the lowest of levels and need some abstraction. Bullet out shined all the equivlents so here I am! Right now I am trying to get a simple Hello World tutorial to run.

I am using bullet-2.76 downloaded it yesterday and I am trying to compile it via Cmake for Visual Studio 2010.

I am following the guidelines off the wiki shown here.

My CMake configuration looks like this.
Image

My Error is the following.

Code: Select all

1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: __thiscall btRigidBody::btRigidBody(struct btRigidBody::btRigidBodyConstructionInfo const &)" (??0btRigidBody@@QAE@ABUbtRigidBodyConstructionInfo@0@@Z) referenced in function _wmain
1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: __thiscall btStaticPlaneShape::btStaticPlaneShape(class btVector3 const &,float)" (??0btStaticPlaneShape@@QAE@ABVbtVector3@@M@Z) referenced in function _wmain
1>DomsFourthTest.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_wmain
1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: __thiscall btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver(void)" (??0btSequentialImpulseConstraintSolver@@QAE@XZ) referenced in function _wmain
1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher@@QAE@PAVbtCollisionConfiguration@@@Z) referenced in function _wmain
1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration@@QAE@ABUbtDefaultCollisionConstructionInfo@@@Z) referenced in function _wmain
1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: __thiscall btDbvtBroadphase::btDbvtBroadphase(class btOverlappingPairCache *)" (??0btDbvtBroadphase@@QAE@PAVbtOverlappingPairCache@@@Z) referenced in function _wmain
1>DomsFourthTest.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>DomsFourthTest.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>DomsFourthTest.obj : error LNK2019: unresolved external symbol "protected: __thiscall btConvexInternalShape::btConvexInternalShape(void)" (??0btConvexInternalShape@@IAE@XZ) referenced in function "public: __thiscall btSphereShape::btSphereShape(float)" (??0btSphereShape@@QAE@M@Z)
1>DomsFourthTest.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>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btSphereShape@@UBEXMAAVbtVector3@@@Z)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btSphereShape@@UBE?AVbtVector3@@ABV2@@Z)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertexWithoutMargin(class btVector3 const &)const " (?localGetSupportingVertexWithoutMargin@btSphereShape@@UBE?AVbtVector3@@ABV2@@Z)
1>DomsFourthTest.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)
1>DomsFourthTest.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>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall btConvexShape::~btConvexShape(void)" (??1btConvexShape@@UAE@XZ) referenced in function "public: virtual __thiscall btConvexInternalShape::~btConvexInternalShape(void)" (??1btConvexInternalShape@@UAE@XZ)
1>DomsFourthTest.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)
1>DomsFourthTest.obj : error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z) referenced in function "public: virtual char const * __thiscall btConvexInternalShape::serialize(void *,class btSerializer *)const " (?serialize@btConvexInternalShape@@UBEPBDPAXPAVbtSerializer@@@Z)
Looks like a linker error but I explicitly followed the guidelines.

My command line win32 program has all 3 of the required included projects as dependencies (Collisions, Dynamics and Linear Maths). The compilation fails when it tries to compile the hello world code.

I use this include.

#include <btBulletDynamicsCommon.h>

I have these configurations under properties for my project.

VCC++ Directories->Include->Bullet SDK\src
VCC++ Directories->Library->DomsFourthTest\lib\debug (an extra when trying to resolve the issue)

C/C++->General->Additional Include Directories->Bullet SDK\src
Linker->General->Additional Library Directories->DomsFourthTest\lib\debug

I didn't post arbitrarily and did a search for someone following in my footsteps and found one.
Their issue was within the code generation difference between the projects properties. I have some discrepencies in that I use precise floats in my code and I dont use an enhanced instruction set, synchronising them did not help.

I would expect an additional dependency to be missing from the linker that was not specified based on what the error looks like. Perhaps one of my includes is missing or being directed to the wrong place?

Any suggestions?

Thanks EO
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: Another one with Linker trouble.

Post by EnlightenedOne »

I cracked it, while I had setup all this stuff correctly the guide states only to link in the additional library location for the compiler, it does not state that you need to add LinearMath.lib;BulletDynamics.lib;BulletCollision.lib; to the additional dependencies in the linker section although I guess that is common sense. I feel the idiot now! I though adding the project dependencies would have made it do the job!

Yay physics demos time!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Another one with Linker trouble.

Post by Erwin Coumans »

This is a cmake problem setting the 'Link Library Dependencies' to NO for the Bullet libraries libraries and we need to fix this. Unfortunately cmake has many issues and we are wasting a lot of time un-doing a lot of that.
See attached picture.

Try re-enabling the Link Library Dependencies setting to YES for BulletDynamics/BulletCollision/LinearMath etc, and see if that works for you. Once enabled, you should not need to add the manual library names, but just enable the 'Dependencies' as described in the wiki. We'll update the Wiki with a picture.
Thanks,
Erwin
linklibrary_dependencies.png
linklibrary_dependencies.png (119.04 KiB) Viewed 21720 times
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: Another one with Linker trouble.

Post by EnlightenedOne »

First of all thankyou for the feedback I was expecting this post to go by the wayside.

To be honest as soon as you decide to use something like this your going to be willing to fight your way through the compiler errors to get to it even if you do have to improvise slightly. Three dll files sitting outside of the .exe wont hurt anyone in my books when it comes to releasing a program.

This post was modified because I got an error due to me not using the hello world setup I origianlly used. See the next post for the error.

May I trouble you to tell me if there is a Direct X version of the visual debugger like the one available for OpenGL around? I dont want to have to use both DX and OGL and find a way to make them share a render target surface to figure out what collision space looks like relative to DX world space! Although I am glad they share the same space orientation notation.

Thanks EO
Last edited by EnlightenedOne on Wed Sep 08, 2010 10:52 pm, edited 1 time in total.
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: Another one with Linker trouble.

Post by EnlightenedOne »

Oh yes as you might have picked up I am using Bullet 2.77 beta now instead of 2.66!
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: Another one with Linker trouble.

Post by EnlightenedOne »

My apologys!

That was an attempt at running the vehicle demo rather than hello world. I tried the method again with your specifications for just hello world after confirming it worked with those dependencies I removed them and changed the librarian settings on all the other projects. Upon compiling I got the standard 24 unresolved externals you get when you have no linker setup to combine the files!

Here they are again.

4>------ Build started: Project: Fifth Attempt, Configuration: Debug Win32 ------
4>Build started 08/09/2010 23:47:21.
4>InitializeBuildStatus:
4> Creating "Debug\Fifth Attempt.unsuccessfulbuild" because "AlwaysCreate" was specified.
4>ClCompile:
4> All outputs are up-to-date.
4>ManifestResourceCompile:
4> All outputs are up-to-date.
4>Link:
4> All outputs are up-to-date.
4>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btRigidBody::btRigidBody(struct btRigidBody::btRigidBodyConstructionInfo const &)" (??0btRigidBody@@QAE@ABUbtRigidBodyConstructionInfo@0@@Z) referenced in function _main
4>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btStaticPlaneShape::btStaticPlaneShape(class btVector3 const &,float)" (??0btStaticPlaneShape@@QAE@ABVbtVector3@@M@Z) referenced in function _main
4>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
4>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver(void)" (??0btSequentialImpulseConstraintSolver@@QAE@XZ) referenced in function _main
4>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher@@QAE@PAVbtCollisionConfiguration@@@Z) referenced in function _main
4>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration@@QAE@ABUbtDefaultCollisionConstructionInfo@@@Z) referenced in function _main
4>main.obj : error LNK2019: unresolved external symbol "public: __thiscall btDbvtBroadphase::btDbvtBroadphase(class btOverlappingPairCache *)" (??0btDbvtBroadphase@@QAE@PAVbtOverlappingPairCache@@@Z) referenced in function _main
4>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)
4>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)
4>main.obj : error LNK2019: unresolved external symbol "protected: __thiscall btConvexInternalShape::btConvexInternalShape(void)" (??0btConvexInternalShape@@IAE@XZ) referenced in function "public: __thiscall btSphereShape::btSphereShape(float)" (??0btSphereShape@@QAE@M@Z)
4>main.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)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btSphereShape@@UBEXMAAVbtVector3@@@Z)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btSphereShape@@UBE?AVbtVector3@@ABV2@@Z)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btSphereShape::localGetSupportingVertexWithoutMargin(class btVector3 const &)const " (?localGetSupportingVertexWithoutMargin@btSphereShape@@UBE?AVbtVector3@@ABV2@@Z)
4>main.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)
4>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)
4>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall btConvexShape::~btConvexShape(void)" (??1btConvexShape@@UAE@XZ) referenced in function "public: virtual __thiscall btConvexInternalShape::~btConvexInternalShape(void)" (??1btConvexInternalShape@@UAE@XZ)
4>main.obj : error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)
4>main.obj : error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z) referenced in function "public: virtual char const * __thiscall btConvexInternalShape::serialize(void *,class btSerializer *)const " (?serialize@btConvexInternalShape@@UBEPBDPAXPAVbtSerializer@@@Z)
4>E:\Doms Core\Uni Primary Work Core\Year 3\Bullet Physics Tests\First compile\Fifth Attempt\Debug\Fifth Attempt.exe : fatal error LNK1120: 24 unresolved externals
Black
Posts: 1
Joined: Sun Mar 13, 2011 1:04 am

Re: Another one with Linker trouble.

Post by Black »

Solution: RightClick on your project ->Add existing item-> Find BulletCollision.lib->add. Likewise for BulletDynamics, LinearMath.
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: Another one with Linker trouble.

Post by EnlightenedOne »

I appreciate the update but this forum post is far out of date I am afraid I can link bullet up fine these days :)

Thank you for helping regardless! Apologise for me not posting that it was resolved when it did get sorted.
rahul
Posts: 1
Joined: Tue Aug 02, 2011 6:51 pm

Re: Another one with Linker trouble.

Post by rahul »

i am getting the same 24 errors , trying to run the hello world program...any help will be appriciated. ( i have added additional dependencies in the linker portion )
EnlightenedOne
Posts: 37
Joined: Wed Sep 08, 2010 2:57 pm

Re: Another one with Linker trouble.

Post by EnlightenedOne »

Hi Rahul,

I have these configurations under properties for my project.

VCC++ Directories->Include->C:\Program Files %28x86%29\Bullet Physics SDK\bullet-trunk-svn-rev2338\src
//This is only true if your app is multi-threaded!
VCC++ Directories->Library->C:\Program Files\Boost SDK\bin.v2\libs\thread\build\msvc-10.0\debug\link-static\threading-multi

//MAKE SURE YOU HAVE BOTH OF THESE!
Linker->General->Additional Library Directories->C:\Program Files %28x86%29\Bullet Physics SDK\bullet-trunk-svn-rev2338\msvc\2008\lib\Debug

Linker->Input->Additional Dependencies->
LinearMath.lib
BulletDynamics.lib
BulletCollision.lib

Remember those are the lib files you are compiling with the other included projects added into your solution and VS must be told where they are output when it makes them for the last project to be able to have them in its .exe; So if you add the additional libraries but dont include the addition directory it isn't smart enough to make the connection for you and will linker fail despite you including the dependencies.

My project also has build dependency on the 3 projects (as it has to link to them after they are built so they exist and you can modify the original source!) I assume you have included in your solution.

Hope that helps its been a couple of months since I worked with Bullet in Visual Studio so my memory of exactly how I fixed everything is obviously weakened, I only remember how to have it setup right :p

Good luck,
EnlightenedOne
RyanFavale
Posts: 9
Joined: Mon Jan 17, 2011 11:10 pm

Re: Another one with Linker trouble.

Post by RyanFavale »

I am running Visual Studio Express 2013 and am running into this issue compiling x64.
I've tried all of the above but still getting the unresolved external symbol.

Once I call
btBroadphaseInterface* pPhysics = new btDbvtBroadphase();
I get the linker error.

I have my project dependencies set (Bullet3Collision,Bullet3Dynamics,LinearMath).
I have my project's "link library dependencies" set to Yes.
I have the bullet src directory set in "Additional Include Directories".

I also tried adding the 3 bullet project's output lib directory to "Additional Library Dependencies".
And I tried adding the libs to Linker=>Input=>"Additional Dependencies".
I also tried adding the 3 libs to my project from (Right-Click)Project=>Add=>"Existing Item".
And I tried setting "link library dependencies" in each of the 3 bullet projects (Bullet3Collision,Bullet3Dynamics,LinearMath).
I tried also using the non-Bullet(3) projects.

Is this an issue with 64bit?
Is it an issue with VS2013?
I am using bullet3-Bullet-2.83-alpha.

I have a 32bit project running fine using VS2005 and bullet 2.77.

[Edit: I just tried creating a blank slate bare bones win32 app in VS2013 and built in 32bit but getting the same exact issue]
[Edit 2: Tried it in VS2005 and get the same issue. Maybe I have a bad version of bullet?]
RyanFavale
Posts: 9
Joined: Mon Jan 17, 2011 11:10 pm

Re: Another one with Linker trouble.

Post by RyanFavale »

OMG, I found it!

I missed the step adding the libs to "Project Properties=>Linker=>Input=>Additional Dependencies" (BulletCollision.lib BulletDynamics.lib LinearMath.lib).
I also needed to add the local lib folder cmake made to "Project Properties=>VC++ Directories =>Library Directories" ([project directory]\lib\Debug or Release).

Working in my new project now! :D
RyanFavale
Posts: 9
Joined: Mon Jan 17, 2011 11:10 pm

Re: Another one with Linker trouble.

Post by RyanFavale »

Aaaaaaag!! Having the issue again on another project. This time in Visual Studio 2010.
I've gone over the steps a few times, but this time I do have all the libs in the correct places. :-/

1.) CMake configure for VS10 (bulletDir => projectDir)
2.) Check Build_Bullet3, Build_Extras, Build_Shared_Libs, Install_Libs, Use_Double_Precision, Use_Glut, Use_MSVC_Fast_FlotingPoint, Use_MSVC_Incremental_Linking, Use MSVC_Runtime_Library_DLL
3.) CMake Generate
4.) Add generated projects to solution (BulletCollision,BulletDynamics,LinearMath)
5.) Add bullet install src dir to project settings under VC++ Directories =>Include Directories
6.) Add CMake generated lib directory for my project under project settings => VC++ Directories =>Library Directories
7.) Add bullet install src dir to project settings => c/c++ => General => Additional Include Directories
8.) Add CMake generated lib directory to project settings => Linker => General => Additional Library Directories
9.) Make sure Link Library Dependencies is checked
10.) Add libs to project settings => Linker => Input => Additional Dependancies (BulletCollision.lib;BulletDynamics.lib;LinearMath.lib;)

And I also tried directly adding the libs to the project.

Please help! :?
RyanFavale
Posts: 9
Joined: Mon Jan 17, 2011 11:10 pm

Re: Another one with Linker trouble.

Post by RyanFavale »

Aaaaand right after writing that I found the issue.
I deleted the CMake cache and re-ran the config (making sure I picked the VS 2010 32bit config).
I left all the checkboxes as is with their defaults checked.
Re-added the Bullet projects to my solution and voila! It worked. :roll:
Kirity
Posts: 7
Joined: Wed May 13, 2015 10:57 am

Re: Another one with Linker trouble.

Post by Kirity »

The error : 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)
---------------------------------------------------------------------------------------------------

Even i was facing the same issue but nothing worked as specified in this thread.

I am working with VS 2013 and bullet 3.

But after following as mentioned in this link http://bulletphysics.org/mediawiki-1.5. ... om_scratch,,,to add dependencies i have done as below

Right click on BulletTestAppl ->Properties->Common Properties->References->Add New Reference
(Of course this is not my solution but i got it through stackoverflow : http://stackoverflow.com/questions/6530 ... ion-issues)

Then it worked !!

Hope this may help someone.
Post Reply