[python-win32] Building extensions with non-MSVC compilers

David Rushby davidrushby at yahoo.com
Mon Nov 1 16:40:49 CET 2004


--- Niki Spahiev <niki at vintech.bg> wrote:

> David Rushby wrote:
> 
> > It's worth noting that the "free" command-line version of MSVC 7.1
> > (http://msdn.microsoft.com/visualc/vctoolkit2003/ ) can be made to
> > compile and link both C and C++ extensions with Python 2.4, if
> you're
> > willing to go to a lot of trouble:
> >   - Downloading and installing the .NET 1.1 runtime and .NET SDK.
> >   - Downloading and installing the huge Windows Platform SDK, which
> has
> > a particularly annoying through-the-web, IE-only installer (this
> can be
> > circumvented and the files saved for offline installation).
> >   - Overriding distutils' insistence that the full version of
> VStudio
> > 2003 be installed.
> >   - Using the msvcrt.lib from the Platform SDK (msvcrt.lib is not
> > included with the command-line version of MSVC 7.1).
> 
> I was unable to find msvcrt.lib in Platform SDK, maybe its in .NET
> SDK?

I was mistaken in saying it comes with the Platform SDK; it's probably
with the .NET SDK.  On my Windows 2000 system, the operating system is
installed on C:, while most development tools are on D:.  Despite the
fact that I ordered all of these SDKs to install on D:, directories
"Microsoft Visual Studio .NET" and "Microsoft Visual Studio .NET 2003"
were still created in "C:\Program Files".  The msvcrt.lib of which I
spoke is in "C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\lib", which I believe to be part of the .NET SDK.  The .NET
SDK includes a non-optimizing version of VC++; msvcrt.lib accompanies
it, but seems to work fine with the optimizing VC++ included with the
"Toolkit 2003".  I think this overlap was an unintentional slip on
Microsoft's part.

> > - Generating msvcprt.lib on the basis of msvcp71.dll
> > (msvcprt.lib is also not included with the command-line 
> > version of MSVC 7.1).
> 
> This one too?

No.  To my knowledge, the official Microsoft C++ .lib file is not
available with any of the free SDKs.  It can be generated from
msvcp71.dll, however (msvcp71.dll is included with both the .NET SDK
and the Toolkit 2003).  I've found instructions on how to do this in at
least two places on the web.  I'd link directly to them, but I'm not
sure how Microsoft's legions of lawyers feel about them, since it seems
that the omission of the dynamic runtime .lib files from the 2003
Toolkit was a deliberate bid to make it unsuitable as a replacement for
the full version of VStudio for most developers except students.  If
you're Feeling Lucky, however, you might just strike it rich with
"missing the import library msvcprt.lib needed during linking".


		
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now. 
http://messenger.yahoo.com


More information about the Python-win32 mailing list