Win32 Libs for 2.4

"Martin v. Löwis" martin at
Tue Dec 7 08:30:57 CET 2004

Robin Becker wrote:
> I thought that static .libs didn't make reference to the dll's they 
> need; isn't that done at load time?

Unfortunately, thanks to Microsoft's infinite wisdom, static libs
*do* reference DLLs. The C lib headers contain things like

#pragma lib("msvcrt.lib") // or some such

The compiler translates this into a reference to the DLL in the
object file, which the linker will then translate into a reference
to the DLL when linking, even if the DLL was not giving on the linker
command line.

However, I am uncertain how this works with multiple VC versions -
whether the DLL reference is CRT version independent or not.
You should view the resulting extension module in depends.exe,
and check whether it refers to multiplce CRT dlls (which would be


More information about the Python-list mailing list