[C++-sig] Linking to libboost_python, on Ubuntu - I've forgotten something...
kirit.saelensminde at gmail.com
Mon Nov 17 09:29:46 CET 2008
Simon Pickles wrote:
> When I run the python program which attempts to use the library
> generated by bjam, I get this:
> simon at urth-webserver:~/WorkingCopies/server/trunk/hybrid_test$ python
> Traceback (most recent call last):
> File "hybridTest.py", line 2, in <module>
> import Hybrid
> ImportError: libboost_python-gcc42-d-1_37.so.1.37.0: cannot open shared
> object file: No such file or directory
> I have built boost 1.37.0 from source using:
> sudo bjam -sPYTHON_ROOT=/usr/local/lib/python25 -sPYTHON_VERSION=2.5
> --build-type=complete --toolset=gcc stage
Looks like you don't have the .so anywhere it can be found. You want to
either set LD_LIBRARY_PATH to the location of your Boost .so files, or
you can use the <dll-path> Bjam option to hard code the paths in your
build Python .so.
You could also install the Boost files to somewhere they will be found
(/usr/local/lib/ should do).
More information about the Cplusplus-sig