c compiler on Windows

Scott David Daniels Scott.Daniels at Acm.Org
Thu Oct 7 13:25:39 EDT 2004


Max M wrote:
> I have a midi library in Python, that currently only works on midi files.
> 
> http://www.mxm.dk/products/public/pythonmidi
> 
> I want to make it work on realtime midi, with hardware in and out ports.

VC 6.0 is fine if you want to build for python up through 2.3.* on
windows.  VC 7.1 is the way to go for 2.4 and on.  There is a free
compiler that you can download from Microsoft to build for 2.4, but
I have yet to be able to fully build a module for it.

MinGW32 (Minimal Gcc for Windows 32-bit) in its more recent forms
should also be enough to build for windows.  It works for systems
up through 2.3.*, and I suspect there will be a way to make it
happy for 2.4 on as well.  I, however, have not been able to set
it up properly yet (which is probably my fault) -- I cannot get
it to reference standard Python globals yet.

Part of my incompetence at installing the GNU setup comes from my
having used either the enthought (no affiliation except happy user)
Python build:
     http://www.enthought.com/downloads/downloads.htm
or the SciPy build:
     http://www.scipy.org/download
One of these, I believe, installed a MinGW32 compiler properly set up
for integration, but I may have simply followed directions and added
it while setting one of those up (and forgotten because it went so
smoothly).

I suspect that, over time, building extension modules with both the
"free" 7.1 compiler and the GNU compiler will be well-documented
simple procedures, but there may be a delay before such things come
out.  If you play on 2.3.* until you are really C comfortable, it
may have already happened by the time you are ready to move to 2.4.

The full VC 7.1 toolkit (visual debugger and such) is supposed to be
quite good, so if the price isn't a problem, you might want to look
into using it.  It won't work for Python before 2.4, but the IDE may
make it easier for you to develop C programs (depending primarily on
your learning and development style).

-Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list