Setting Up a Bullet Physics Project

From the forum “Installing Bullet system wide (using shared libraries or frameworks) is not actively supported, so it relies on people contributing. For most users, it is recommended to simply add the Bullet source code files to your project and build and link it statically, along with other C++ source code files.”

But using Bullet system wide is the other alternative. Here are the instructions for using Bullet system wide in OS X 10.8  (using Bullet 2.81-rev2613):


Download bullet and unzip

In terminal,

cd path/to/bullet
mkdir bullet-build
cd bullet-build
-DCMAKE_INSTALL_PREFIX=/Library/Frameworks -DCMAKE_INSTALL_NAME_DIR=/Library/Frameworks \
make -j4
sudo make install

Create a new C++ (command line tool) project in Xcode

Add “/Library/Frameworks” to Framework Search Paths in Build Settings of target


Try the line

#include <BulletDynamics/btBulletDynamicsCommon.h>

in main.cpp and compile

If you get the error ‘BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h’ file not found then this header file was not installed in /Library/Frameworks

Copy the file from



BulletCollision.framework in /Library/Frameworks

If you are having trouble with the following build errors:
“btTypedConstraint::serialize(void*, btSerializer*) const”, referenced from:
“btAlignedFreeInternal(void*)”, referenced from:
then you have to include the Bullet frameworks in your Xcode project. Navigate to /Library/Frameworks and then drag the Bullet frameworks into your Xcode project. You need at least LinearMath.framework and BulletDynamics.framework. (Those two will fix the above linking errors.) But you probably also want BulletCollision.framework and maybe others. (This step was taken from here.)