delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/09/20:20:09

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: smtp2.ihug.co.nz: Host animal.ihug.co.nz [203.29.161.168] claimed to be ihug.co.nz
Message-ID: <39E26078.3F382C71@ihug.co.nz>
Date: Tue, 10 Oct 2000 13:19:04 +1300
From: Ross Smith <ross DOT s AT ihug DOT co DOT nz>
Organization: Ihug
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: AW: Linking Dynamic Libraries
References: <004501c031f0$10478ad0$0d33028b AT zapperlot DOT materna DOT de> <39E1CC08 DOT F475851F AT ece DOT gatech DOT edu> <39E2468B DOT BFDD3AB7 AT ihug DOT co DOT nz> <39E259A7 DOT CBAD325F AT ece DOT gatech DOT edu>

Charles Wilson wrote:
> 
> You still need to worry about things like __declspec(dllexport) and
> __declspec(dllimport).

What's the point of --export-all-symbols then? I was under the
impression that it was intended to duplicate the Unix convention, where
all external symbols are automatically exported from a .so. (Actually,
the help refers to "global" symbols, not "external", but I assumed that
just meant that whoever wrote the help didn't know C++.)

> As far as documentation, there's the mailing list, and 'ld --help' and
> Mumit's (really out-of-date) dll-helpers packaqe at
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/dllhelpers.html.
> Would you like to update that package for the current capabilities of
> ld/gcc ?

Sure, as soon as I figure out the details myself :-)

> NOTE 2: I used the extension '.dll.a' for the import library; cygwin's
> linker will search for 'libfoo.dll.a' in preference to 'libfoo.a';
> libfoo.a is assumed to be a static library (although the linker will use
> libfoo.a if .dll.a is not found)

Could you amplify please? I don't understand what you mean by this.
libfoo[.dll].a is a static link library. If I put -lfoo on the link
command, it looks for libfoo.a in accordance with the normal linking
procedure (even if a DLL implib has a different format to a normal
static library (I have no idea whether it does), the linker has no way
to know it's dealing with a DLL implib until after it's found and read
the file). If I don't put -lfoo on the link command, it has no reason to
look for foo dot anything. That's certainly the way all the system DLLs
work: if I want to use, say, wsock32.dll, I link with -lwsock32.

-- 
Ross Smith <ross DOT s AT ihug DOT co DOT nz> The Internet Group, Auckland, New Zealand
========================================================================
"C++ is to programming as sex is to reproduction. Better ways might
technically exist but they're not nearly as much fun." -- Nikolai Irgens

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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