Python for amd64 and mingw-w64

David Cournapeau cournape at
Fri Dec 19 06:08:49 CET 2008


I want to build python extensions with mingw-w64 on windows 64 bits. I
found some problems which I think are python bugs/deficiencies, but
would like a confirmation:

 - Any extension requires the MS_WIN64 to be defined, but this symbol
is only defined for MS compiler (in PC/pyport.h). Shouldn't it be
defined independantly of the compiler ? One problem is that without
this defines, SIZEOF_SIZE_T is set to 4 with gcc. Another consequence
which can be seen even through a trivial , do nothing extension is
that Py_InitModule4 is used (whereas the same source file will use
Py_InitModule4_64, which is used when SIZEOF_SIZE_T !=SIZEOF_INT, in
 - I have some link problems related to Py_InitModule4_64. I believe
the problem is in libpython26.a, which according to nm does not have
this symbol defined, whereas python26.dll has.



More information about the Python-list mailing list