|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-02-12 20:30:39
[Sorry, in another post I incorrectly used "PYTHON_PATH" instead of
"PYTHONPATH"]
FYI, http://www.boost.org/more/mailing_lists.htm#cplussig is usually a
better place to go with Boost.Python questions.
"yinglcs2_at_[hidden]" <yinglcs2_at_[hidden]> writes:
> I am trying to build and run the boost python example:
> http://www.boost.org/libs/python/doc/tutorial/doc/html/python/hello.html
>
> But after I run the bjam command, how can I import
> that to my python environment on Linux?
If you want to import the hello.so module,
# Allow the system to find libboost_python.so
LD_LIBRARY_PATH=bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true
export LD_LIBRARY_PATH
# Allow python to find the extension module
PYTHONPATH=./bin/tutorial/hello.so/gcc/debug/shared-linkable-true
export PYTHONPATH
python -c "import hello; print hello.greet()"
HTH,
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net