[New-bugs-announce] [issue4709] Mingw-w64 and python on windows x64
report at bugs.python.org
Sun Dec 21 09:53:34 CET 2008
New submission from Cournapeau David <david at ar.media.kyoto-u.ac.jp>:
I believe the current pyport.h for windows x64 has some problems. It
does not work for compilers which are not MS ones, because building
against the official binary (python 2.6) relies on features which are
not enabled unless MS_WIN64 is defined, and the later is not defined if
an extension is not built with MS compiler.
As a simple example:
printf("sizeof(Py_intptr_t) = %d\n", sizeof(Py_intptr_t));
If you build this with MS compiler, you get the expected
sizeof(Py_intptr_t) = 8, but with gcc, you get 4. Now, if I build the
gcc -I C:\Python26\include -DMS_WIN64 main.c
Then I got 8 as well.
I believe the attached patch should fix the problem (I have not tested
it, since building python on amd64).
title: Mingw-w64 and python on windows x64
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file12411/mingw-w64.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce