New versions breaking extensions, etc.

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 13 01:22:08 EST 2004


Jive wrote:
> Well, ain't that enough to gag a maggot?  I was aware that DLL's don't
> really link dynamically.  I was not aware that the crt dll file name was
> hard-coded into the linker.  But I looked on the link line and, sure enough,
> that particular dll was not listed among the others.

It's not hard-coded in the linker, but hard-coded in the import library.
So if you link with msvcrt.lib (which might not be the precise name
of the import library - I cannot look up the precise name right now),
msvcrt.lib will in turn refer to msvcr71.dll.

In addition, through #pragma comment(lib, foo.lib), the Microsoft C
*header* files force references to import libraries into the object
files, so that the import libraries don't even appear on the linker
line - instead, the linker gets additional command line options from
the object files; use dumpbin to find out what those are.

On the plus side, I believe that the name of the import library for
the CRT was always the same (msvcrt.lib), so different versions of
that file refer to different actual CRTs (msvcrt.dll, msvcrt40.dll,
msvcr70.dll, msvcr71.dll). So just replacing your msvcrt.lib file
of VC6 with the VC71 one might be enough - but then, perhaps there
also where changes to the header files which you need to get.

Regards,
Martin



More information about the Python-list mailing list