Boost logo

Boost-Build :

Subject: [Boost-build] Best way to interactively use python extension without installing anything
From: Sebastian (basti.kr_at_[hidden])
Date: 2009-07-18 07:19:32

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,

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