views:

188

answers:

1

Has anyone had any luck with compiling 64-bit Python extension modules for Windows using mingw64?

I have successfully compiled the extension in question with VS2008 for this platform. I've also compiled it with mingw32 (with a 32-bit python). I would prefer both builds to use GCC.

I've installed the mingw64-x86_64-w64 GCC 4.5.1 set of tools using Cygwin and convinced Python to use them. However, linking to python itself failed.

So I picked up pexports 0.44, used it to dump out a python26.def file and create libpython26.a.

Now, as in this question, the only link error I'm getting from Python is about __imp_py_InitModule4. Browsing through the def file, I see a Py_InitModule4_64 symbol.

Any ideas?