delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Date: | Fri, 26 May 2000 12:32:45 -0400 |
Message-Id: | <200005261632.MAA24358@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | cookj AT cs DOT man DOT ac DOT uk |
CC: | cygwin AT sourceware DOT cygnus DOT com |
In-reply-to: | <200005261245.NAA66045@ceratops> (message from Jon Cook on Fri, |
26 May 2000 13:45:51 +0100 (BST)) | |
Subject: | Re: ld -shared |
References: | <200005261245 DOT NAA66045 AT ceratops> |
> Is the -shared option to ld supported?. Yes, but it creates DLLs not shared libraries. > ld -shared a.o -o liba.so > > But when I try this on cygwin I get an unresolved reference to b - > exactly as if the shared option is ignored. You have to link against an import library that defines where b comes from. DLLs work differently than shared libraries. You'll end up with something like this: ld -shared a.o libb.a -o a.dll where libb.a is the import library for, say, b.dll Try "ld --help" for a full list of options; the DLL-specific ones are at the end. --out-implib and --export-all-symbols will probably be useful to you. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |