Shared Library

Perhaps someone who knows lots more about MicrosoftWindows than I do can describe how Windows DLLs differ from shared libraries in Unix. (Besides, of course, DllHell)

Unix has long allowed multiple versions of the same shared library to coexist. A symlink, libfoo.so, would point to the most recent version of the library, ie libfoo.1.2.so. If an application needed a more specific version; it could reference it.

Dlls, at least a while back, didn't allow this. Only one version could be installed; if a newer version broke an older program, you were stuck. (To make things worse, the occasional unfriendly application would downgrade a DLL, replacing a newer version with an older version).

Of course, Windows DLLs have a few other features/attributes that Unix .so files don't have. Shared segments, for one (which would cause lots of problems with different versions). The guarantee that the DLL resides at the same location in the address space in each process that runs it, for another.

DllHell seems to be one reason that MS distributes lots of libraries as ComObjects?, which have much better versioning than Dlls. (Or so I'm told...')

-- Scott Johnson


A couple differences between shared libraries on typical Unix systems, and DLLs on Windows (my knowledge may be out of date).


CategoryLinker


EditText of this page (last edited December 9, 2004) or FindPage with title or text search