Build Python with Mingw and gcc

前端 未结 2 1730
情深已故
情深已故 2020-12-29 06:37

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) vers

相关标签:
2条回答
  • 2020-12-29 06:53

    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.

    0 讨论(0)
  • 2020-12-29 07:01

    You may try this repository:

    hg clone https://bitbucket.org/puqing/python-mingw

    It is a copy of the official repository but contains some modification to make it compile with mingw. Enter PC/MinGW directory:

    cd PC/MinGW && make

    Not sure if it compiles in win64, but with win32 and msys it should work.

    0 讨论(0)
提交回复
热议问题