[Pyrex] undefined symbol: None

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Jun 23 03:41:33 CEST 2003


John J Lee <jjl at pobox.com>:

> What am I doing wrong here?
> 
> >>> import _tidylib
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: ./_tidylib.so: undefined symbol: None

Never try to use a C file produced by Pyrex if the Pyrex
compiler reports an error. Your .pyx file gives me:

/home/cosc/staff/research/greg/tmp/foo.pyx:21:24: Cannot convert Python object to 'TidyDoc'

You seem to be somehow expecting Pyrex code to pass
in a TidyDoc, which is impossible because it's a
C struct. You'll have to wrap it in an extension
type.

Have you studied the Quick Guide to Pyrex?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list