
Hi, I am currently running Linux (Fedora), with python2.4 . I am keen to use boost to enable me to use python and C++ code together. I have built the Boost package using Bjam. All seemed to go good there following the build instruction for the hello world example. I then built the hello world example fine using the : bjam -sTOOLS=gcc HelloTest now if i run up python on the command line, and type:
import hello
into the python shell it fails to find the hello module, i then tried moving the hello.so file into : /usr/lib/python2.4/lib-dynload the hello module is now found, however the 'libboost_python.so' cant be found, i guess because hello depends on this and it cannot be found. Which environment variable do i have to set to fix this link problem? Current environment variable settings: PYTHON_PATH=usr/lib PYTHON_ROOT=usr/lib PYTHON_VERSION=2.4 cheers Dave i hope you can help! jeff

# jeff.mearing@raymarine.com / 2006-04-26 12:48:20 +0100:
I am currently running Linux (Fedora), with python2.4 . I am keen to use boost to enable me to use python and C++ code together. I have built the Boost package using Bjam. All seemed to go good there following the build instruction for the hello world example. I then built the hello world example fine using the :
bjam -sTOOLS=gcc HelloTest
now if i run up python on the command line, and type:
import hello
into the python shell it fails to find the hello module, i then tried moving the hello.so file into :
/usr/lib/python2.4/lib-dynload
the hello module is now found, however the 'libboost_python.so' cant be found, i guess because hello depends on this and it cannot be found. Which environment variable do i have to set to fix this link problem?
You need to install the compiled boost. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991

Jeff Mearing
Hi,
I am currently running Linux (Fedora), with python2.4 . I am keen to use boost to enable me to use python and C++ code together. I have built the Boost package using Bjam. All seemed to go good there following the build instruction for the hello world example. I then built the hello world example fine using the :
bjam -sTOOLS=gcc HelloTest
now if i run up python on the command line, and type:
import hello
into the python shell it fails to find the hello module, i then tried moving the hello.so file into :
/usr/lib/python2.4/lib-dynload
the hello module is now found, however the 'libboost_python.so' cant be found, i guess because hello depends on this and it cannot be found. Which environment variable do i have to set to fix this link problem?
You need to get the directory of libboost_python.so into your LD_LIBRARY_PATH or into your ld.so file (I think that's what it's called; I forget -- there's some file with standard library search locations)... or you could just drop libboost_python.so into one of the standard library search locations like /usr/local/lib/ -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (4)
-
David Abrahams
-
Jeff Mearing
-
loufoque
-
Roman Neuhauser