用Mingw和gcc构建Python [英] Build Python with Mingw and gcc
问题描述
是否可以在Windows 7上使用Mingw和gcc从源代码构建Python解释器?
我想推出一个64位版本。
如果有64位Python(gcc Mingw)版本可供下载,请告诉我,我会用那也。
最后我还是想用gcc和mingw来编译它。
MinGW -w64 gcc / ld应该能够直接链接到DLL,否则你必须使用 gendef
创建.def文件和 dlltool
创建一个导入库。
其次,有一个补丁集可以用MinGW来构建Python ,但我是不确定它的64位兼容性。
Is it possible to build Python interpreter from source with Mingw and gcc on Windows 7? And I would like to biuld a 64bit version.
If a 64bit Python (gcc Mingw) version is available for download please let me know, I would use that also. At the end I still would like to compile it with gcc and mingw.
First off, you do not need to build Python with MinGW-w64 to link to it and embed a interpreter. Just extract the msi installer, and use the prebuilt DLL. Note you'll have to be careful not to mix msvcr[t|90].dll objects, but I've never seen that be a real issue personally.
MinGW-w64 gcc/ld should be able to link to DLL's directly, otherwise you'll have to use gendef
to create a .def file and dlltool
to create an import library.
Secondly, there's a patchset to build Python with MinGW, but I'm not sure about its 64-bit compatibility.
这篇关于用Mingw和gcc构建Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!