簡體   English   中英

使用Cython生成C代碼時出現“未知類型名稱”錯誤

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

我已經使用Cython成功生成了.c文件,但是當我嘗試使用gcc進行編譯時,出現了這些錯誤...這只是錯誤的第一行...共有3頁類似的錯誤。我的.py代碼很簡單:

print "test"

錯誤:

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

請參閱此郵件列表帖子

引用:

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. 

請參閱此解釋列表,其中列出了一些可能對您有用的編譯器!

有關編譯的指南,還請查看Cython Wiki的編譯頁面

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM