I found the solution

gcc -dynamiclib -undefined dynamic_lookup -single_module -o c1.so c1.o

Note that python will not find libraries called *.dylib in your work directory,
while *.so works fine. Does any know why?

Cheers
  Tommy

On May 30, 2008, at 9:22 PM, Tommy Grav wrote:

Hi everyone.

I am on a Powerbook running 10.5.3 and trying to go through the example on
http://www.perrygeo.net/wordpress/?p=116 , which fails. Can anyone
tell me what I am doing wrong?

I create the c1.pxd
and run

cython c1.pyx
gcc -c -fPIC -I/usr/include/python2.5 cl.c
gcc -dynamiclib -o c1.dylib -dylib c1.o
Undefined symbols:
  "_PyDict_New", referenced from:
      ___Pyx_Import in c1.o

ld: symbol(s) not found
collect2: ld returned 1 exit status

_______________________________________________
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