Jump to content

  • Log In with Google      Sign In   
  • Create Account


Box2D Linker Woes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Andy474   Members   -  Reputation: 677

Like
0Likes
Like

Posted 30 May 2014 - 04:21 AM

Hey Folkz,

 

Hoping someone can help me here. this should b fairly simple.

 

I am trying to look at C++ again, so am using SFML and Box2D to create a small game, easy. I have setup SFML and have a working program, but ... Box2D! i have looked at every page on Google on how to link the .lib into my project and have followed every step to the T and i still get:

Error	1	error LNK2019: unresolved external symbol "public: __cdecl b2World::b2World(struct b2Vec2 const &)" (??0b2World@@QEAA@AEBUb2Vec2@@@Z) referenced in function "public: __cdecl PhysicsSystem::PhysicsSystem(struct b2Vec2)" (??0PhysicsSystem@@QEAA@Ub2Vec2@@@Z)	F:\Code\ShapeGames\ShapeGames\PhysicsSystem.obj	ShapeGames

Now, i know what the problem is, just not how to solve it.

 

I have added the Box2D Header to the Additional include Directories and Intelli-sense picks up the correct function definitions etc. 

I have added the .lib's path to  to both Linker -> General and the Box2D.lib to Linker-> Input -> Additional Dependencies.

 

AFAIK, the linker is even picking up Box2D.lib because if i remove the files path from Linker -> general it tells me cannot find file. So it found the file, but isn't linking it? right? wrong? what have i missed? i have followed the tutorials linked below to the word :/

 

So, i have spent 3hrs on this now. Help me Obi-wan your my only hope.

 

Links to tutorials:

- http://aneelkkhatri.wordpress.com/2011/06/14/setting-up-box2d-library-in-visual-studio-c/

- http://autowaaagh.wordpress.com/2012/12/07/setting-everything-up-part-2/



Sponsor:

#2 Orangeatang   Members   -  Reputation: 1463

Like
0Likes
Like

Posted 30 May 2014 - 08:53 AM

Which project in your solution are you linking to Box2D.lib?



#3 Andy474   Members   -  Reputation: 677

Like
0Likes
Like

Posted 30 May 2014 - 09:16 AM

Its a Win Console application "ShapeGames" (its the only project) using Vs2012, its a 64bit build.

 

 

arrrggh, thanks ... 64bit /headdesk x64


Edited by Andy474, 30 May 2014 - 09:19 AM.


#4 Orangeatang   Members   -  Reputation: 1463

Like
0Likes
Like

Posted 30 May 2014 - 09:32 AM

Its a Win Console application "ShapeGames" (its the only project) using Vs2012, its a 64bit build.

 

And your Box2D.lib is x64 as well? (possibly not the issue, but worth checking)


Edited by Orangeatang, 30 May 2014 - 09:33 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS