cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Any difference between libcurl.dll and libcurl-4.dll

From: Andre Guibert de Bruet <andy_at_siliconlandmark.com>
Date: Sun, 19 Aug 2007 00:19:23 -0400

On Aug 18, 2007, at 8:01 PM, Brian Dessent wrote:

> It would be nice of you as a convenience to your users to include the
> ABI version as part of the library's filename, as it is still possible
> to have conflicts between projects -- this happens if you have a
> brain-dead installer that copies unversioned libraries into
> %WINDIR%\System32, or if the user adds the app's directory to PATH,
> which exposes its DLLs to potentially be searched during process
> startup
> for all processes.

Excellent write-up! I thought that I would expand on a couple of things:

Firstly, programs are required to not install "re-distributable DLL
files" into %WINDIR%\System32 to pass the "Designed for Windows"
certification. Microsoft has made the official recommendation that
programs that require specific versions of a library ship with the
library in the program's directory. Yes, this is a waste of space,
and its main cause is the lack of support in the PE file format for a
program to request libraries at certain revision levels (Such as
"libcurl.dll at version 7.16.4"). Recent UNIX-variants have gotten
around the issue by adding symbol versioning to the dynamic loader.
Of course, the addition of this badly needed feature to Windows might
break a number of "creative" assumptions made by 3rd-party vendors.

Second, during DLL path resolution, the directory where the program/
DLL resides is usually searched first, unless some magic is passed to
LoadLibraryEx().

The following links are excellent reference material on the matter:

http://www.microsoft.com/whdc/archive/wfp.mspx
http://msdn2.microsoft.com/en-us/library/ms682586.aspx
http://msdn2.microsoft.com/en-us/library/ms686203.aspx

Cheers,

/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Code poet / Sysadmin * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Received on 2007-08-19