Forum

> > Off Topic > How to compile the Box2D libraries
Forums overviewOff Topic overviewLog in to reply

English How to compile the Box2D libraries

9 replies
To the start Previous 1 Next To the start

old Re: How to compile the Box2D libraries

TheOn1yLefT
BANNED Off Offline

Quote
Dark Byte has written
I have downloaded Box2D and I have CMake and MinGW. How can I compile the Box2D libraries with MinGW?

And that's cause coffe isn't for children
(yes i don't knew what he is talking)

old Re: How to compile the Box2D libraries

oxytamine
User Off Offline

Quote
TheOn1yLefT has written
Dark Byte has written
I have downloaded Box2D and I have CMake and MinGW. How can I compile the Box2D libraries with MinGW?

And that's cause coffe isn't for children
(yes i don't knew what he is talking)

That's because you don't speak english and sound like 5 years old child.

old Re: How to compile the Box2D libraries

Flacko
User Off Offline

Quote
I think you meant that you included all the .h files

Yes, indeed, you should compile and link against the resulting .lib file to get rid from the undefined references.

Note that I didn't compile this library. Ever. I'm just reading the (lame) instructions it included in the zip file.

old Re: How to compile the Box2D libraries

archmage
User Off Offline

Quote
No, I compiled the .cpp files. I used this:
More >

Also, I have not been able to compile it yet. I run CMake then make and all I get is more makefiles.

old Re: How to compile the Box2D libraries

Lee
Moderator Off Offline

Quote
If you want to compile the entire Box2D library into your application (without needing the libbox2d.so), you'll need to do

1
2
export b2d='/dir/to/box2dsource'
g++ -I$b2d $b2d/Box2D/Common/*.cpp $b2d/Box2D/Rope/*.cpp $b2d/Box2D/Collision/*.cpp $b2d/Box2D/Dynamics/Contacts/*.cpp $b2d/Box2D/Dynamics/Joints/*.cpp $b2d/Box2D/Dynamics/*.cpp $b2d/Box2D/Collision/Shapes/*.cpp your_application.cpp

This allows for portability
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview