Compiling Python Extensions on Win32 w/GCC 2.95

Robert Kern
Wed, 11 Aug 99 02:45:15 GMT

With the recent release of GCC 2.95, I have updated my instructions
for compiling Python extensions on Windows 95/98 and NT systems using
free tools.  My previous instructions explained the setup for using
EGCS 1.1.2, an "experimental" version of GCC.  Since EGCS merged into
GCC to make GCC 2.95, the instructions could be updated to use this
newest compiler.

To provide some background, GCC (GNU Compiler Collection) is a GPL'ed,
well, compiler collection that includes front ends for C, C++,
Fortran77 (with some optional Fortran90 constructs, IIRC),
Objective-C, and (now) a few, experimental Chill and Java front ends.
More information on GCC 2.95 is available at 

It is possible now to compile programs for the i386-mingw32 target, a
native target for Win32 systems.  Such programs use a Microsoft DLL as
its C runtime library (CRTDLL.dll by default, MSVCRT.dll as an
option).  Unlike the i586-cygwin32 target 
<URL:>, the i386-mingw32 target
does not require the program to link with the Cygwin DLL.
Consequently, there are *no* licence restrictions imposed on the
resulting program (not by the compiler at any rate; linking against
third-party code might restrict use).  Information on the Win32 port
of GCC, and the port itself, are at 

Paul Sokolovsky originally patched the Python headers to allow the
then-EGCS to compile Python extension modules for the i386-mingw32
target.  I now maintain a web page containing instructions on setting
up the compiler, headers, and the other related paraphenalia required.

My page is 

<P><A HREF="">Compiling
Python Extensions on Win32 with GCC 2.95</A> - Instructions for
compiling Python extensions on Win32 OS's with free tools.  (11-Aug-99)

Robert Kern           |
----------------------|"In the fields of Hell where the grass grows high
This space            | Are the graves of dreams allowed to die."
intentionally         |           - Richard Harter
left blank.           |

----------- comp.lang.python.announce (moderated) ----------
Article Submission Address:
Python Language Home Page:
Python Quick Help Index: