MinGW and Python
"Martin v. Löwis"
martin at v.loewis.de
Tue Apr 25 15:50:29 EDT 2006
Edward Elliott wrote:
> Thanks for that very informative post! To clarify, mingw (aka gcc
> -mno-cygwin) has no POSIX layer like cygwin. Because your post could also
> be (incorrectly) interpreted to mean mingw removes the cygwin dll
> dependency by just linking it in statically. But I googled and this is not
> the case.
Well, you are not compiling with neither mingw, nor cygwin; you are
compiling with gcc in either case.
The question is what C library (and header files) you use: with cygwin,
you use cygwin1.dll (and its header files); with mingw, you use
msvcrt.dll (or some other MS CRT), along with the a GNU version of the
Microsoft header files.
> Couldn't you compile the msvc-python code under gcc/mingw? If the code
> sticks to C standards, and mingw can link to native libs, it should work.
Well, there is no native C library on Microsoft Windows: the system
simply doesn't include an official C library (I know there is crtdll.dll
and msvcrt.dll, but these aren't "endorsed" system C libraries).
> The only problem is if python relies on some msvc-specific weirdness under
> msvc. While there's much weirdness in msvc, I would expect a
> cross-platform app like python to stay away from it.
For Windows, that would require not to use any of the standard C
functionality, since the system doesn't provide that functionality out
of the box. So Python itself never uses and msvcrt weirdness (well,
some, but that could be dropped easily) - yet still, the Python
binary will depend on a specific version of the MS CRT.
Regards,
Martin
More information about the Python-list
mailing list