Visual Studio not installed

Paul Moore pf_moore at yahoo.co.uk
Wed Jul 14 11:54:11 EDT 2004


michael at foord.net (Fuzzyman) writes:

> [snip..]
>> But keep in mind that both the interpreter and all C extensions need to 
>> be compiled with the same compiler.  Most people who write extensions 
>> plan for them to be used with Visual Studio 6, since that's what the 
>> python.org distribution uses.  If you use some other compiler, then 
>> you'll have to recompile every extension you install, and you may need 
>
> AFAIK this statement is just wrong. I've compiled extensions with gcc
> (from minGW) on windows and had them work fine alongside other
> precompiled extensions.

It's note exactly wrong, just oversimplified. The interpreter and all
extensions need to *use the same version of the C runtime*. Mingw gcc
compiles code to use the MS C runtime DLL, and so can build extensions
which will work with python.org's distribution of the interpreter. But
you still have to take care, as the CRT DLL needed changes depending
on which version of MSVC is used to build the interpreter. For python
2.3, the interpreter uses MSVCRT.DLL, which is what mingw uses by
default. For python 2.4, the interpreter uses MSVCR71.DLL, and mingw
needs to have a -lmsvcr71 flag specified to use the right DLL.

For 2.3, this is all relatively easy - you can use MSVC 6 or mingw to
build extensions which work with the python.org build of the
interpreter.

For 2.4, the picture is still changing. You can use MS Visual Studio
.NET 2003 without problems, and mingw support is nearly there. The
free MS compilers offer other possibilities, but (AFAIK) no-one has
got the details resolved with these, yet.

Hope this helps,
Paul.
-- 
This signature intentionally left blank



More information about the Python-list mailing list