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
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 "extending.so" lives,
starting up the python interpreter and typing "import extending" - I
get the error message:
"ImportError: libboost_python-gcc44-d-1_39.so.1.39.0: 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 extending.so" gives me:
libboost_python-gcc44-d-1_39.so.1.39.0 => 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 acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk