cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: linking statically using MS Visual C

From: Dave Dribin <dave-ml_at_dribin.org>
Date: Wed, 6 Apr 2005 16:34:35 -0500

On Apr 5, 2005, at 2:43 PM, Jim Napier wrote:

> Since I upgraded to 7.13.1 from 7.11.1 and started adding
> -DCURL_STATICLIB to my cl.exe CFLAGS options, in addition to my
> app.exe file I also see an app.lib and an app.exp file that are now
> created but never used to be there. This occurs during the linking
> phase and the linker now prints out a message about creating the files
> that it didn't used to display. Here's a sample of the link command
> I'm using:
>
> link.exe -nologo -subsystem:console -machine:I386
> -out:dist/bin/app.exe object1.obj object2.obj libcurl.lib
>
> Any idea why this changed? And what is the significance of the new
> files?

I don't know why this changed, but I've noticed these files, too. From
reading up at MSDN, link.exe thinks there are some export symbols:

    
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
vccore/html/_core_link_output.asp

"When LINK creates a program that contains exports (usually a DLL), it
also builds a .lib file, unless an .exp file was used in the build. You
can control the import library file name with the /IMPLIB option."

I'm not familiar enough with the Microsoft tool chain, but I suspect
somewhere along the line the Curl functions are being marked as
exportable I, too use -DCURL_STATICLIB, and I tried adding -DWIN32,
but to no avail.

-Dave
Received on 2005-04-06