Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <39B83913.BCFCA86F@ece.gatech.edu>
Date: Thu, 07 Sep 2000 20:55:47 -0400
From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
X-Mailer: Mozilla 4.75 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Robert Collins <robert.collins@itdomain.com.au>
CC: "Gary V. Vaughan" <gvv@techie.com>, Earnie Boyd <earnie_boyd@yahoo.com>,
        cygwin@sources.redhat.com
Subject: Re: libtool
References: <20000907133430.25505.qmail@web119.yahoomail.com> <20000907185550.O7695@demon.co.uk> <01d501c0190e$fc28e930$f7c723cb@lifelesswks>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



Robert Collins wrote:

> gcc -shared -g -O2 -Wall,--enable-auto-image-base,--out-imp-lib=.libs/libnam
> e.dll.a -o .libs/libname.dll -export-dynamic a.lo b.lo c.lo

I think this should be:

gcc -shared -g -O2 -Wall -Wl,--enable-auto-image-base
-Wl,--out-implib=.lib/libname.dll.a -Wl,--export-all-symbols -o
./libs/libname.dll a.lo b.lo c.lo

That is, '-Wl,--out-implib=' not '-Wl,--out-imp-lib'
'-Wl,--export-all-symbols' not '-export-dynamic'

This second one is why you had no exports -- the linker never saw the
'--export-dynamic' command because gcc ate and ignored it (plus, even if
the linker saw '--export-dynamic' it would ignore it, too, because it's
the wrong command).

> 
> built a dll quite happily from standard sources except there were no
> exports...


> 
> 2) the .def files format was broken
> -> I haven't looked at this yet

If you want ld to write the <in-memory, auto-generated> def-file to
disk, then you need '-Wl,--output-def=.libs/libname.def'

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

