First, edit your user-config.jam (i.e. edit ~/user-config.jam) to include the following:
1234567891011
using darwin : 4.2.1~iphone
: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv7 -mthumb -fvisibility=hidden -fvisibility-inlines-hidden
: <striper>
: <architecture>arm <target-os>iphone
;
using darwin : 4.2.1~iphonesim
: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -fvisibility=hidden -fvisibility-inlines-hidden
: <striper>
: <architecture>x86 <target-os>iphone
;
Then, follow these steps to install:
12345678910111213
# <grab source from boost.org>tar xzf boost_1_44_0.tar.gz
cd boost_1_44_0
./bootstrap.sh
# Set this to whatever you want to build againstSDK_VERSION="4.1"# Install for device:./bjam --prefix=${HOME}/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDK_VERSION}.sdk/usr toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-${SDK_VERSION}define=_LITTLE_ENDIAN link=static install
# Install for simulator./bjam --prefix=${HOME}/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${SDK_VERSION}.sdk/usr toolset=darwin architecture=x86 target-os=iphone macosx-version=iphonesim-${SDK_VERSION}link=static install
This will install boost into a prefix directory of: