HowTo Use Cython on a Windows XP Box?

David Bolen db3l.net at gmail.com
Sat Sep 1 01:59:43 EDT 2007


David Lees <debl2NoSpam at verizon.net> writes:

> Yes, you are correct in understanding my question.  I thought my post
> was clear, but I guess not.  I will go try the pyrex list.

You might also try looking for references to distutils support for
non-MS compilers, since Pyrex (and presumably Cython) uses distutils
under the covers to build the final extension.  I'm pretty sure there
is support in recent Python releases for using mingw rather than MSVC
for most extensions (there may be problems with using certain Python
APIs that depending on specific C RTL structures like files).

As to using VC, yes, it does have to be VC 7.1, e.g,. Visual Studio
2003.  You can't use 2005, as MS didn't maintain runtime
compatibility.  I'm sure there are a number of threads about that also
available.  If I recall correctly, VC 7.1 began to be used in the 2.4
timeframe - although it was getting discussed back when 2.3 was
getting released, based on an offer Microsoft had made to provide
copies to core developers.  The discussions are archived, but VC 6 was
definitely long in the tooth at that point.  As the development tools
aren't free, they haven't been upgraded past that point to date.  It's
unfortunate that when MS changed the main runtime DLL with VC 7 (for
the first time in a pretty long time), that they then did so
immediately again (and incompatibly) with VC 8.

At the time, there were also efforts with some success to use the free
toolkit MS made available (although I think it was sans optimizer),
but then I think that got pulled and/or it became more difficult to
find/use, but my memory is fuzzy.

You mention having VS 2005 - if so, do you also have an MSDN
subscription?  I believe you should still be able to get VS 2003 via
that route if you first started with 2005 and thus never had 2003.  If
not, the mingw approach may be your best bet.

-- David



More information about the Python-list mailing list