In Mac OS X 10.9 Mavericks compiled boost 1.55, and the use in xcode.
1、Download url. you could download later version.
http://www.boost.org
2、Uncompress. use tar to uncompress it.
tar -zxvf boost_1_55_0.tar.gz
3、Building boost.
cd boost_1_55_0
./bootstrap.sh --prefix=/Users/<your user name>/Development/Libraries/boostBuilder/ toolset=clang
we set the install path to /Users/<your user name>/Development/Libraries/boostBuilder/ , changes it to yours, the very important is set compiler to clang
4、Execute b2.
./b2 toolset=clang --with-filesystem cxxflags="-arch i386 -arch x86_64 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -ftemplate-depth=512" linkflags="-stdlib=libc++" link=static stage install
--with-filesystem 表示只编译"filesystem"模块。如果是--without-filesystem表示除了“filesystem”以外的所有模块。
the static libraries are installed at
"/Users/<your user name>/Development/Libraries/boostBuilder/lib",
and the headers are installed at
"/Users/<your user name>/Development/Libraries/boostBuilder/include"
5、XCode setting.
add the library path and the header path at Build Settings->Search Paths, then Add files to ...
6、
Add "/Users/
<your user name>
/Development/Libraries/boostBuilder/lib/
libboost_filesystem.a
",
"/Users/<your user name>/Development/Libraries/boostBuilder/lib/libboost_system.a"
to "Link Binary With Libraries".