Forum



How to compile the Box2D libraries
9 replies



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)
1
-DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON
Then, run make.
TheOn1yLefT has written
And that's cause coffe isn't for children
(yes i don't knew what he is talking)
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.

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.
Also, I have not been able to compile it yet. I run CMake then make and all I get is more makefiles.


1
2
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



