Welcome! Log In Create A New Profile

Advanced

Box2D install script

Posted by tweakdeveloper 
Box2D install script
April 07, 2015 08:02PM
So the old version of Box2D on the wiki is really out of date, so I thought I'd try building it from a newer source so that it'd be compatible with the manual. You'll need to have CMake installed. Here's a build script; just copy and paste it into your terminal. Make sure you have $DEVKITPRO and $DEVKITPPC set. Good luck! :D
git clone git://github.com/blackberry/box2d
cd Box2D/Build
cmake -DBOX2D_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=$DEVKITPRO/libogc \
  -DCMAKE_CXX_COMPILER=$DEVKITPPC/bin/powerpc-eabi-g++ \
  -DCMAKE_SYSTEM_NAME=Generic -DBOX2D_INSTALL=ON ..
make all install
cd $DEVKITPRO/libogc/lib
rm -rf Box2D
mv libBox2D.a wii

In order to use it in your project, just add Box2D to your libraries in the Makefile and include the header wherever you end up using it.
LIBS += -lBox2D
#include <Box2D/Box2D.h>



Edited 2 time(s). Last edit at 04/07/2015 08:04PM by tweakdeveloper.
Sorry, only registered users may post in this forum.

Click here to login