[C++-sig] boost.python import problem

Jim Bosch talljimbo at gmail.com
Mon Aug 30 19:23:39 CEST 2010


On 08/30/2010 10:19 AM, Junwei Zhang wrote:
> Hi, everyone,
>
> I just started study boost.python. and have following problem
<snip>
>
> g++ boostpy.cc  -lpython2.5 -I /usr/include/python2.5 -o boostpy.so -shared
>
<snip>
>
> any suggestion?
>

Two compiler/linker flags: -fPIC and -lboost_python

You may have to append a suffix to get the appropriate boost_python 
shared library in some cases.

Jim Bosch


More information about the Cplusplus-sig mailing list