MS VC++ Toolkit 2003, where?

sturlamolden sturlamolden at yahoo.no
Thu Apr 27 15:06:44 EDT 2006


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. 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.




More information about the Python-list mailing list