[C++-sig] Getting Boost.Python Working on MacOS X

Martin Hediger ma.hed at bluewin.ch
Mon Nov 23 13:05:36 CET 2009


Dear All

I have been trying to get Boost.Python working on my MBP with Mac OS
10.5, since I need it to compile the chemical modeling software
"AVOGADRO" for modification reasons.
I pretty much followed the instructions on both the Boost, Getting
Started guide and the Boost.Python Introduction. I managed to get the
"Lambda" and the "Regex" examples working perfectly, but unfortunatly
not the python "embedding" and "extending" examples, neither as well
the "hello world". Apparently, no
embedding/extending module is being built for me to import in the
python-test script following the build.
My setup is as follows:

Boost root: /usr/local/boost_1_40_0/ (so I call every command with sudo).

The lambda and regex example files (.cpp) were perfectly compiling in a
directory ~/programming_tests/, so my compiler is very likely to work.
In order to do so, I issued the command:

cpp+ -I example.cpp -o example
/usr/local/boost_1_40_0/lib/libboost_regex-mt.a

for some (possibly to the overall problem related) reason, it does not
work with the dynamic
library .dylib.


What would be the basic procedure to get the boost.python examples
running on Mac OS X?
Thanks a lot for any suggestions.




More information about the Cplusplus-sig mailing list