2011年1月27日 星期四

How to build Box2D?

Box2D Physics Engine. The source code is located at code.google. In brief, Box2D is an open source C++ engine for simulating rigid bodies in 2D. Box2D is developed by Erin Catto.

How to get source code? The standard way is to use subversion: svn checkout http://box2d.googlecode.com/svn/trunk/ box2d-read-only. There are a lot of binary packages of subversion. I am lazy, so I choose SlikSVN. After installing SlikSVN, I use command "svn checkout" to get the source code in the command prompt.

How to build? I am very lazy, so I use VS2005/2008 as my IDE. In the instruction of Building.txt, I need CMake to generate the solution file. OK, it's fine. I install CMake, and then I continue following the instruction of Building.txt. Yes! Box2D.sln is generated!

Finally, I open Box2D/Build/Box2D.sln and compile all projects. Run HelloWorld & Testbed to verify Box2D is OK! Yes! Box2D is working!

沒有留言:

張貼留言