Cpython 编译python工程报错
生活随笔
收集整理的這篇文章主要介紹了
Cpython 编译python工程报错
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
cpython編譯python工程,編譯__init__時報錯
__init__.cp36-win_amd64.lib : fatal error LNK1120: 1 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120報錯原因是編譯器編譯import對象時會首先編譯__init__對象,沒有的話會報錯,詳細原因可見:python - How to compile __init__.py file using cython on Windows - Stack Overflow
解決方法:
在編譯執行文件中加入如下內容:
def get_export_symbols_fixed(self, ext):pass # return [] also does the job!# replace wrong version with the fixed: build_ext.get_export_symbols = get_export_symbols_fixed即可成功編譯
?
總結
以上是生活随笔為你收集整理的Cpython 编译python工程报错的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySql 模糊查询
- 下一篇: 关于软件的思考