[C++-sig] Linking to libboost_python, on Ubuntu - I've forgotten something...

Simon Pickles simon at science-projects.org
Mon Nov 17 10:46:23 CET 2008



Kirit Sælensminde wrote:
> 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 
>> hybridTest.py
>> 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).
>
That did the trick - Thanks

Sure I didn't have to do that last time - never mind. It works and I can 
progress!
>
> K
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
>

-- 
::::::::::::::::::::

Latest NEWS >> http://www.science-projects.org/news.html

Our PORTFOLIO is online at >> http://www.science-projects.org/workshop/portfolio/index.html

Science Projects
20 St James Street
Hammersmith
London
W6 9RW
t: +44 (0)20 8741 2305
f: +44 (0)20 8741 2307

http://www.science-projects.org
http://www.the-observatory.org
http://www.inspirediscoverycentre.org


Science Projects Ltd. is a company limited by guarantee registered in England No: 02186073 and a registered Charity No. 298542. Its registered office address is 20 St James Street, Hammersmith, London W6 9RW.



More information about the Cplusplus-sig mailing list