On Dec 7, 5:01 pm, DavidM <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm embedding python in a C prog which is built as a linux shared lib.
>
> The prog is linked against libpython, and on startup, it calls
> Py_Initialize().
>
> The prog imports a pure-python script. The script starts up ok, but when
> it imports the 'math' module, the import fails with:
>
> Traceback (most recent call last):
>   File "/home/david/work/video/myprogs/dvedit/test/frei0rfx1.py", line 10, in 
> <module>
>     import math
> ImportError: /usr/lib/python2.5/lib-dynload/math.so: undefined symbol: 
> PyExc_ValueError
> Failed to import math
>
> Any ideas of how to work around this?
>
> Please note - the program I'm writing *must* be built as a shared lib, so
> the usual practice of 'extend, don't embed' is just not an option here.
>
> Thoughts?

Are you actually linking your C program against the Python library?

Graham

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to