Build Boost on Mac with Xcode Build Boost on Mac with Xcode xcode xcode

Build Boost on Mac with Xcode


The easiest way I've found to do it is to install MacPorts, then you can install/build Boost via a single command:

sudo port install boost

Plus you get similar access to other open source software. The only downside I've found is that, like any other package management system, they are not always up to date with the latest version.

If you prefer Homebrew as your package manager, the command is:

brew install boost


I don't know how to use Boost from XCode (I'm not a Mac programmer), but building boost is usually done through their own build tool, bjam.

They have a guide to building boost here, and you can download the latest version of bjam here

Once it is built, you reference it from Xcode the same way you would any other library. The boost/include should be added to your include path, and the libraries in boost/lib can be referenced for the boost libs that require it.


To build boost on a mac, follow the unix variants getting started page (http://www.boost.org/doc/libs/1_39_0/more/getting_started/unix-variants.html). You won't use Xcode directly to perform the build, but once complete you can add the boost include paths and dylib's to your Xcode project.