[Cython] Embedding Cython

Rasjid Wilcox rasjidw at gmail.com
Wed Apr 9 02:03:37 CEST 2008


Hi,

I've just been playing a little with Pyrex and Cython.  In particular,
testing the Embedding Pyrex HOWTO at
http://www.freenet.org.nz/python/embeddingpyrex/.

It works with Pyrex, but not with Cython.  In particular,

$ cython testpyx.pyx

Error converting Pyrex file to C:
------------------------------------------------------------
...
# IMPORTANT - we need to explicitly prototype the function
<snip>
cdef public void inittestpyx()
                           ^
------------------------------------------------------------

.../mycode/python/cython/testpyx.pyx:29:28: Non-extern C function
declared but not defined

============================================

Any ideas on how to get this working with Cython?

Cheers,

Rasjid.


More information about the Cython-dev mailing list