Installing Box2D v2.2.1 on Ubuntu 12.01
Guide to configure, build and install Box2D on Ubuntu
Download, Unzip and Configure
wget https://box2d.googlecode.com/files/Box2D_v2.2.1.zip
unzip Box2D_v2.2.1.zip
cd Box2D_v2.2.1
premake4 gmake
Build release and debug versions
cd Build/gmake
make config="debug"
make config="release"
If build fails, edit the premake4.lua, and remove the unneeded hello world and testbed projects.
Install headers and libs
in Build/gmake/bin/Debug rename libBox2d.a libBox2d-debug.a
in Build/gmake/bin/Release rename libBox2d.a libBox2d-release.a
copy libBox2d-debug.a & libBox2d-release.a to /usr/local/lib
copy Box2D folder to /usr/include/
Add Code::Blocks Linker options
Project > Build Options > Debug/Release > Linker Settings > Add > /usr/local/lib/libBox2d-[debug|release].a