python无法编译为.pyd文件

时间:2016-03-25 10:00:39

标签: python

cl /LD hellomodule.c /Fe_hellomodule.pyd -IC:\Users\Andy\AppData\Local\Programs\Python\Python35-32\include C:\Users\Andy\AppData\Local\Programs\Python\Python35-32\libs\python35.lib

我在visual studio 2015命令提示符下运行了以上命令,返回错误:

   Creating library _hellomodule.lib and object _hellomodule.exp
hellomodule.obj : error LNK2019: unresolved external symbol _PyInt_Check referenced in function _say_hello
hellomodule.obj : error LNK2019: unresolved external symbol _PyInt_AsLong referenced in function _say_hello
hellomodule.obj : error LNK2019: unresolved external symbol _Py_InitModule referenced in function _inithello
_hellomodule.pyd : fatal error LNK1120: 3 unresolved externals

任何人都知道怎么做,谢谢。

0 个答案:

没有答案