[C++-sig] import fails for "undefined symbol"

David Abrahams dave at boost-consulting.com
Mon Aug 20 16:34:54 CEST 2007


on Wed Aug 15 2007, ZiZi Zhao <zzhao-AT-laika.com> wrote:

> In my embedded boost.python plugin, if I put "import math\nout_foo=math.sin(1.0)" in a string
> for PyRun_String "code", I got the following:
>
> error: executing python code
> Traceback (most recent call last):
>   File "<string>", line 1, in ?
> ImportError: /local/prod/python/python_2.4.4/lib/python2.4/lib-dynload/math.so: undefined
> symbol: PyExc_OverflowError
> warning: python code did not set output: out_foo
>
> The first time, I used static libraries of libpythonxx.a and libboost_python-gcc.a to make my
> plugin, I got the error message. After changing to use shared libraries, I still got the same
> error. Googled some info about this error, but they d idn't help too much. Hope to get a
> solution from this group.

You need to link your application against libpython24.a

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com




More information about the Cplusplus-sig mailing list