MS VC++ Toolkit 2003, where?

Chris Mellon arkanes at gmail.com
Fri Apr 28 11:42:33 EDT 2006


On 27 Apr 2006 12:06:44 -0700, sturlamolden <sturlamolden at yahoo.no> wrote:
>
> Alex Martelli wrote:
>
> >       Provides the core msvcrt.lib for msvcr71.dll against which to link
> > your extensions.  This is critically important, as without it you are
> > going to wind up linking against the wrong run-time and will see crashes
> > whenever a core object such as a file is shared across run-time
> > barriers.
>
> You can find msvcr71.dll in the same directory as Python.
>
> The problem is that you cannot redistribute msvcr71.dll unless you by a
> copy of Visual Studio 2003 or install VC++ Toolkit 2003. As far as I
> can tell, the .NET SDK license does not give you permission to
> redistribute msvcr71.dll. So if you are going to use Py2Exe, this is a
> dead end. But if you are just going to build a Python extension, you
> don't need to redistribute the DLL (it's already in Python). In that
> case you can use MinGW insted. Just make sure MinGW links with the
> correct CRT. That is, open
>
> c:\mingw\lib\gcc\mingw32\3.4.2\specs
>
> in an editor and change "-lmsvcrt" to "-lmsvcr71"
>
> There is a second advantage with this. MinGW is an optimizing compiler.
> The C/C++ compiler you get from the .NET SDK is not.

This is untrue - the MSVC compiler in the VS 2003 Toolkit is exactly
the same compiler that ships with real visual studio, and does
excellent optimization. Modulo all the extremely correct comments in
this thread about how useless it is to make comments about the
optimization capabilities of a compiler, I find that the VS 2003
compiler generally generates faster and (often much) smaller code than
GCC/mingw

>There is a "Visual
> C++ 2005 Express" edition which has an optimizing compiler. But it
> links yet another version of the CRT, msvcr80.dll, and does not give
> you permission to redistribute msvcr71.dll.
>

There are numerous distribution issues with the VS 2005 runtimes (I
don't want to get into them now) besides the legal ones, but it's
useless for building extension modules unless you also re-build Python
(and then your Python can't use any other extension modules). It's
workable for people embedding Python and probably not anyone else.

> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list