Advertisement

Box2D Linker Woes

Started by May 30, 2014 10:21 AM
2 comments, last by Capoeirista 10 years, 8 months ago

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/

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

Advertisement

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

arrrggh, thanks ... 64bit /headdesk x64

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)

This topic is closed to new replies.

Advertisement