This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: library vis export library
- From: "Martin Gainty" <mgainty at hotmail dot com>
- To: "Lee, Robert C." <rc dot lee at ngc dot com>,<cygwin at cygwin dot com>
- Date: Thu, 21 Aug 2003 17:44:02 -0700
- Subject: Re: library vis export library
- References: <03AD0BE3A983D311A26400508B6BFB10045D5738@XCGCA043>
A DLL is a DLL
Whether you
create a DLL by compiling a source file and linking to the correct DLL
format
or assemble precompiled objects and create the DLL which creates the headers
for the exported functions and variables (essentially identifying the exact
signature needed by the linker)
really doesnt matter
Have you ever tried to execute a binary and it croaked because of memory or
resource limitations?
Have you had a common piece of functionality that you would want multiple
developers to Link and Free when they need it...then a DLL will be the
answer
Exporting objects out of a library and relink it with aforementioned gcc
exportlibrary
gcc -shared -o cyg${module}.dll \
-Wl,--out-implib=lib${module}.dll.a \
-Wl,--export-all-symbols \
-Wl,--enable-auto-import \
-Wl,--whole-archive ${old_lib} \
-Wl,--no-whole-archive ${dependency_libs}
will create a DLL for you
A dll can be shared by everyone and can be dynamically loaded and unloaded
leaving a smaller resource footprint
than their weightier static library cousins who are usually bound into huge
weighyy binaries
Hth,
Martin
----- Original Message -----
From: "Lee, Robert C." <rc.lee@ngc.com>
To: <cygwin@cygwin.com>
Sent: Thursday, August 21, 2003 1:40 PM
Subject: library vis export library
> I apologize in advance if this is a stupid question. In the Cygwin User's
> Guide, it shows how to create a dll with gcc with the -shared switch in
much
> the way you create a shareable library, but it also shows how to create a
> export library with gcc. In one case you end up with a dll; in the other,
> you have a dll and a .a file. Why would I use one over the other? And
what's
> the difference?
>
> Thanks,
> Robert
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/