[C++-sig] Setting up a boost.python workflow on a Mac

Randolph Fritz rfritz333 at gmail.com
Mon Oct 5 02:36:34 CEST 2009

I have just successfully--I hope--done this & I want to get my notes
down before I forget the problems I encountered.  These occurred
with Boost 1.39 and Mac OS 10.5.8.

1. Bjam did not automatically detect the Mac OS environment and
   compilation consistently failed.  So, I added the following line to
     using darwin ;

2. I built boost.python according to the getting started guide.  This
   left me with four files in stage/bin:

3. The install command recommended by bjam was "bjam install
   --prefix=<place>".  I attempted to use the command, and found it
   consistently tried to place files in /lib.  A manual move to my
   target library directory fixed that problem.

4. It turned out that the default build script automatically looked
   for debug libraries, which weren't automatically built.  I tried
   "bjam debug" and it placed the following four files in stage/bin:
   These I also placed manually.

5. I then discovered that the sample Jamroot provided did not support
   multi-threaded (*-mt-*) libraries.  I added the following symbolic
   links to my target directory:
     libboost_python-xgcc40-1.39.dylib -> 
     libboost_python-xgcc40-d-1_39.dylib -> 

6. Voila!  My test application built and apparently ran.

Randolph Fritz
  design machine group, architecture department, university of washington
rfritz at u.washington.edu -or- rfritz333 at gmail.com

More information about the Cplusplus-sig mailing list