From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1025b4,9f5c1c8d844fc69e X-Google-Attributes: gid1025b4,public X-Google-Thread: 111c93,9f5c1c8d844fc69e X-Google-Attributes: gid111c93,public X-Google-Thread: fcfb9,9f5c1c8d844fc69e X-Google-Attributes: gidfcfb9,public X-Google-Thread: 10d0a1,9f5c1c8d844fc69e X-Google-Attributes: gid10d0a1,public X-Google-Thread: 1125fa,9f5c1c8d844fc69e X-Google-Attributes: gid1125fa,public From: Volker Dittmar Subject: Re: DLL mess Re: "No-one gets fired for buying Microsoft" Date: 1999/09/20 Message-ID: <37E69470.F3A4F528@internet.de>#1/1 X-Deja-AN: 528518222 Content-Transfer-Encoding: 8bit References: <37D81FE1.E90C3B1F@winkinc.com> <37ddff0d.347678675@news.shore.net> <37e21eba.355787635@news.shore.net> <37e3383f.362320439@news.shore.net> X-Accept-Language: de-DE,en Content-Type: text/plain; charset=iso-8859-1 Organization: Nacamar Group Plc. Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha,comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,gnu.misc.discuss "Se�n � Donnchadha" wrote: > seebs@plethora.net (Peter Seebach) wrote: > > >>> > >>>In that case, the existing programs will probably switch to using 1.2.3. > >> > >>Then why keep 1.2.2 around? > > > >So that, if there *is* a problem (which, admittedly, I've never seen), you > >don't have to search around to figure out where you got the old one. > > > > That's a good point, but I submit that most users (the kind of folks > that don't know a shared library from a public library) wouldn't be > able to take advantage of that. Here, again, Unix benefits from its > computer-literate user base. Which is always a good point... see, M$ tries to dumb people down, whereas Linux does not. > >>Only if the authors realize that the library change breaks existing > >>apps. Conflicts happen when the authors *DON'T* realize it, and > >>neither Unix's nor Windows' scheme can protect against that. > > > >The difference is, if the author *does* know, Windows *still* doesn't > >help. > > > > No help is required. If the authors of a Windows shared library know > that an update is not back-compatible, they can do exactly what they'd > do under Unix - give the updated library a new name (e.g. MFC30 -> > MFC40). That works just as well in Windows as it does in Unix. I've never seen this in practice. And it wouldn't work. What I've seen in older days was this approach: put the DLL in the same directory as the app. Say we have to incompatible DLL's, lets name them MFC30_a.DLL and MFC30_b.DLL - neither the _a nor the _b shows up in the filename, though. App A works best with MFC30_a.DLL, and this DLL is put beside the App A. App B works with MFC30_b.DLL, but it won't work with the (older) MFC30_a.DLL. Now load app B - it loads MFC30_b.DLL from the system directory, and everything works fine. Load app A, and it links to MFC30_b.DLL, and still it works (or app A shows a few minor glitches). Unload both apps, and now load app A. App A loads MFC30_a.DLL and works fine. Now start app B, and it is dynamically linked to MFC30_a.DLL - and this won't work. No chance for app B to load "its" correct DLL. Whom do you blame? Of course, the vendor of app B, though its the fault of vendor A. You see, this way its dependant from the order the DLL's are loaded. Worse things will happen if Vendor A insists on installing "its" DLL in the system directory - now app B stops working, because you can have only ONE DLL of this kind. And I've seen quite a few DLL's with exactly the same version number, but with different lengths. In Linux (or UNIX), this is different. Because the shared libs are named differently, app A can load "its" shared library, and app B can load "its" shared library, too, at the same time (the name differs). Both app will run fine. Of course, you will use more memory, because you have to load both shared libs, but this will work. And better: the comand ldd will show you which shared lib is used. You can track down any problems real fast this way (this is a bit harder with Windows, because M$ sometimes will change DLL's, but won't change the version number, so you won't get a clue). If you install app A and app B stops working - how will you find out the reason for this? BTW: the worst crap I've seen with DLL's concerns Windows 9x. There is a 64Kb-Block in the registry devoted to storing registered DLL's complete with path. If you install too much programs, or use too long path names, this block will some day be filled up, and from then on, you can't install new apps without deleting old ones (or re-installing old ones with shorter path names...). Don't know if Windows NT has the same limits, though, but it wouldn't surprise me... One other thing: because you get the source code with Linux for most of your apps, you can track this kind of problems (incompatibilities) much faster. And if you can't, because you don't care for the source code, there are enough people out there who can and will help you (and who will send bug reports to the programmers, so this will be fixed fast). This is one of the reason why you won't find these kind of problems in the real world... Ciao, Volker