[Distutils] Remark concerning msvc 7.0 for c/c++ extensions for python in windows

Thomas Heller theller at python.net
Wed Jun 9 07:46:46 EDT 2004


Peter Vandersteegen <Peter.Vandersteegen at intec.Ugent.be> writes:

[...]
> Now my question is: is it absolutely necessary to compile everything
> with the same msvc as python is compiled with?
> If not, is the line in msvccompiler.py absolutely necessary?  Could
> this be replaced with a warning, instead of raising an exception?
> Simply aborting completely the compilation proces seems kind of
> drastic.

Strictly speaking, it is necessary to link the extension module to the
same MS runtime libraries as the python dll.  For MSVC 6, this is
MSVCRT.DLL, for MSVC7.1, it is MSVCR71.DLL.

If you don't have MSVC6, you can try to compile your extensions with
Mingw32, which also links with MSVCRT.DLL.  Or you compile Python
yourself with the C compiler you have, and do the same for the
extensions.

>
> greetz and thx for reading so far
>
> Peter
>
> ps. I presume this problem still is present in python 2.4, because
> msvccompiler.py still contains the conflicting lines in the
> cvs-version...

It's not a Python problem ;-)

Thomas




More information about the Distutils-SIG mailing list