[Python-Dev] Python 2.4, MS .NET 1.1 and distutils

M.-A. Lemburg mal at egenix.com
Sat Nov 27 00:26:38 CET 2004

M.-A. Lemburg wrote:
> Thomas Heller wrote:
>> Ronald Oussoren <ronaldoussoren at mac.com> writes:
>>> On 26-nov-04, at 17:27, Martin v. Löwis wrote:
>>>> M.-A. Lemburg wrote:
>>>>> Now since extensions for 2.4 will have to be built using the
>>>>> same compiler as Python itself (the one that comes with VC7.1
>>>>> which is the same as the one in the freely downloadable
>>>>> .NET 1.1 SDK)
>>>> My understanding is that these are not exactly the same compilers;
>>>> I recall that the freely-redistributable one lacks support for
>>>> optimization.
>>> That's not what their download page says:
>>> <quote href="http://msdn.microsoft.com/visualc/vctoolkit2003/">
>>> Microsoft Visual C++ Toolkit 2003
>>>  The Microsoft Visual C++ Toolkit 2003 includes the core tools
>>>  developers need to compile and link C++-based applications for
>>>  Windows and the .NET Common Language Runtime:
>>>     •     Microsoft C/C++ Optimizing Compiler and Linker.  These
>>>     are the same compiler and linker that ship with Visual Studio
>>>     .NET 2003 Professional!
>>> </quote>
> The compiler works happily with the optimization flags...

After doing some extra checks, looking at the generated
assembler and trying the /O2 flag, I have to correct this:
even though the compiler from .NET 1.1 supports the /G optimization
flags it doesn't seem to do any of the more complicated optimizations
which you get with /O2.

Mike Fletcher told me that the Microsoft Visual C++ Toolkit 2003
comes with the optimizing version of the compiler which is also
the one mentioned in the quote.

He also pointed me at:


So in summary you need these things if you want an optimizing
compiler for Python 2.4 extensions:

* MS VC++ Toolkit 2003

* MS Platform SDK (if you want to build Windows specific extensions)

In any, the compiler uses the same command line name, so a PATH based
search for the compiler would provide a useful extension for

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Nov 27 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Python-Dev mailing list