From: Tor L. <tm...@ik...> - 2009-11-23 21:43:21
|
> I also compared it to MSVC 2008 express--it works there "as linux > does" Well, MSVC 2008 -compiled code does not use msvcrt.dll. It uses msvcr90.dll. The problem is in msvcrt.dll on XP at least. msvcrt.dll and msvcr90.dll are separate files, it's not like msvcr90.dll would replace msvcrt.dll completely. (To make things more confusing, the import library for the MSVC version-specific msvcr[789]*.dll DLL in is called msvcrt.lib in each MSVC version (.NET 2003, 2005 and 2008).) > we as developers *can* link against a different version > and/or distribute our released binaries with that version, if desired? It's not only a question of linking as far as I know. Except in some very trivial cases, code must be compiled against header that match the C runtime against which it will be linked. > http://stackoverflow.com/questions/1073509/should-i-redistribute-msvcrt-dll-with-my-application > provides some food for thought... Note that some of the comments there are rather loosely written. Like "You must ship msvcrt with your application. It is not a guaranteed part of the operating system." which when it says "msvcrt" refers to some of the compiler-specific C runtime DLLs (like msvcr90.dll). It does not refer to msvcrt.dll, which *is* shipped with the operating system > Is there an option to static link using mingw's gcc? No. > Also sobering is > "the CRT DLL is no longer considered a system file" from > http://support.microsoft.com/kb/326922 That again is confusingly written, the term "CRT DLL" there must refer to the msvcr[789]*.dll files, not msvcrt.dll. > Does this mean depending on msvcrt.dll is unstable? Hardly. Check for instance what C runtime DLL notepad.exe imports. Yes, our old friend msvct.dll. Still in Windows 7. --tml |