Boost logo

Boost-Build :

From: Stephan Schiffels (stephan80_at_[hidden])
Date: 2008-03-23 12:20:25


I finally managed to build my first python extension via boost-build
and it works. However, there is one annoying problem left: My
extension "" can only be imported into python when I am in
exactly the right location, since the linked install-name of
libboost_python contains a RELATIVE PATH. Here is what otool gives me:

        stephan_at_MyMacBook ~/Desktop/boostpython $ otool -L bin/darwin/
                 bin/darwin/release/ (compatibility version 0.0.0,
current version 0.0.0)
libboost_python-1_34_1.dylib (compatibility version 0.0.0, current
version 0.0.0)
(compatibility version 2.5.0, current version 2.5.0)
                /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
                /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
                /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)

The latter four libraries are correctly installed via absolute paths,
not so the libboost-Python-1_34_1.dylib.

Here is the Jamroot-file I used:

        import python ;

        python-extension hello
                : hello.cpp
                : <include>/Users/stephan/boost_1_34_1 <library>/Users/stephan/
libboost_python-1_34_1.dylib ;

The produced extension can be successfully imported into
python, but only if I copy the "" into the directory from
where the libboost_python library can be found by the relative path.
Any help? Thanks a lot!
Best, Stephan

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at