I built it against *Python 2.5.1.

compile:*
gcc -c
-I/usr/lib/python2.5/site-packages/numpy-1.0.4.0002-py2.5-linux-x86_64.egg/numpy/core/include
-I/usr/bin/python/2.5.1/include/python2.5 -fPIC -fno-omit-frame-pointer
-pthread -fexceptions -ansi -D_GNU_SOURCE  -DMX_COMPAT_32 -g  main.c

compile line for the other c-file is identical to main.c's

*link:*
gcc -g -pthread -shared  main.o module.o  -L/usr/bin/python/2.5.1/lib *
-lpython2.5* -ldl -lm -lpthread -lutil -lmx -lmex -lmat -lm -lm -lstdc++


On Tue, Jan 13, 2009 at 12:00 AM, Michael Abshoff <
[email protected]> wrote:

> Igor Sylvester wrote:
>
> Hi Igor,
>
> > Has anyone had problems with dynamically loading PyExc_IOError when
> > embedding a cython module?
> > While calling init below:
> >
> > *in main.c:
> > *void init {
> >   Py_Initialize();
> >   initmymodule();
> >   do_somethind();
> >   Py_Finalize();
> > }
> >
> > *in module.c:*
> > cdef public void do_something():
> >     import
> > exceptions
> >
> >     print exceptions.IOError # this prints <type 'exceptions.IOError'>,
> > so I don't know what to make of the error below
> >     import numpy  # exception is thrown here, and numpy library is in
> > pythonpath
> >
> > Exception:
> > Exception exceptions.ImportError:
> > '/usr/lib/python2.5/lib-dynload/time.so: undefined symbol:
> > PyExc_IOError' in 'mymodule.myfunction' ignored
> >
> > I'm not yet sure which library in numpy causes the exception but this
> > example is easy to reproduce.
>
> How did you build the extension, i.e. did you link against python2[3|4|5] ?
>
>
> > Thanks.
> > Igor
>
> Cheers,
>
> Michael
>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Cython-dev mailing list
> > [email protected]
> > http://codespeak.net/mailman/listinfo/cython-dev
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to