delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/21/17:44:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [24.34.177.222]
X-Originating-Email: [mgainty AT hotmail DOT com]
From: "Martin Gainty" <mgainty AT hotmail DOT com>
To: "Lee, Robert C." <rc DOT lee AT ngc DOT com>, <cygwin AT cygwin DOT com>
References: <03AD0BE3A983D311A26400508B6BFB10045D5738 AT XCGCA043>
Subject: Re: library vis export library
Date: Thu, 21 Aug 2003 17:44:02 -0700
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Message-ID: <Law10-OE12k8hEJjSCy0002e764@hotmail.com>
X-OriginalArrivalTime: 21 Aug 2003 21:43:45.0368 (UTC) FILETIME=[4BF52580:01C3682D]

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 DOT lee AT ngc DOT com>
To: <cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019