简体   繁体   中英

'unknown type name' error while using Cython to generate C code

I have successfully generated .c file using Cython, but when i try to compile it using gcc, i get these errors... This is just the first line of the error... There are 3 pages of errors similar to this... My .py code is a simple:

print "test"

error:

unknown type name ‘Py_UNICODE’
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)

See this mailing list post .

Citing it:

Cython is not a Python to C compiler in the sense that it does away
with the Python interpreter/runtime, rather it creates .c files that
are compiled against the Python/C API and can be loaded into a running
session. 

See this list of interpreters which lists some compilers that might be useful to you!

For a guide to compilation, also have a look at the compilation page of the Cython wiki

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM