top bar

Building Boost on MacOS X

Revision as of 16:42, 13 January 2011 by Karlh (Talk | contribs)

As of this writing, MM is using the Boost 1.40 release. There are reasonably complete instructions here:


  1. Download boost
  2. ./, (to build the bjam tool)
  3. sudo ./bjam install

To only build the libraries needed by Micro-Manager (a huge time saver), do:

sudo ./bjam --install --link=static --runtime-link=static --threading=multi --layout=tagged --with-system --with-thread --with-iostreams --with-date_time

If you wish to build Universal Binaries, you will need to build boost separately for each architecture. You can do so with the following build script:

# Note: build for ppc and i386 should be with g++4.0. Build for x86_64 should be with g++4.2.
# to accomplish this, the file tools/build/v2/user-config.jam should contain the following two lines:
# using darwin : 4.0 : g++-4.0 ;
# using darwin : 4.2 : g++-4.2 ;
sudo ./bjam --install --build-dir=ppc --toolset=darwin --link=static --runtime-link=static --threading=multi --layout=tagged --prefix=/usr/local/ppc architecture=power address-model=32 macosx-version-min=10.4 --with-system --with-thread --with-iostreams --with-date_time --libdir=/usr/local/ppc/lib --includedir=/usr/local/ppc/include --stagedir=/usr/local/ppc
sudo ./bjam --install --build-dir=i386 --toolset=darwin --link=static --runtime-link=static --threading=multi --layout=tagged --prefix=/usr/local/i386 architecture=x86 address-model=32 macosx-version-min=10.4 --with-system --with-thread --with-iostreams --with-date_time --libdir=/usr/local/i386/lib --includedir=/usr/local/i386/include --stagedir=/usr/local/i386
sudo ./bjam --install --build-dir=x86_64 --toolset=darwin-4.2 --link=static --runtime-link=static --threading=multi --layout=tagged --prefix=/usr/local/x86_64 architecture=x86 address-model=64 macosx-version-min=10.5 --with-system --with-thread --with-iostreams --with-date_time --libdir=/usr/local/x86_64/lib --includedir=/usr/local/x86_64/include --stagedir=/usr/local/x86_64

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact