Boost logo

Boost-Build :

Subject: Re: [Boost-build] Best way to interactively use python extension without installing anything
From: John Reid (j.reid_at_[hidden])
Date: 2009-07-19 08:19:43

You can set up tests in your Jamfile like so:

python-extension _sandbox
        : # sources
bpl-test sandbox_test

then if you do:
bjam -d+2

it will show you the commands it uses to run the test including the

So either use the scripted tests or if you want to do things
interactively use the values from bjam -d+2


Sebastian wrote:
> Hi all,
> I'm at the moment trying to wrap a c++ project but have some conceptual
> problems I will explain using the standard boost::python example.
> When I build the "quickstart" project with the command "bjam test"
> everything works as expected - all tests pass. However, when I try to
> use this extension module interactively - by switching to
> bin/gcc-4.4.0/debug where the extension library "" lives,
> starting up the python interpreter and typing "import extending" - I
> get the error message:
> "ImportError: cannot open shared
> object file: No such file or directory".
> The reason for this is obviously that libboost_python is not in the
> dynamic link path. The command "ldd" gives me:
> ...
> => not found
> ...
> Of course this can be easily corrected by setting the LD_LIBRARY_PATH to
> the right directory. But this is a little tedious for bigger projects,
> where a lot of libraries have to be loaded. Is there some way to let
> bjam use hard coded links (with linker option -R) or let bjam set the
> right LD_LIBRARY_PATH when building debug mode? Or has anyone a better
> idea how to test extensions interactively and without installing everything?
> Thanks for any answers,
> Sebastian
> _______________________________________________
> Unsubscribe & other changes:

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