This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: ld -shared
- To: cookj at cs dot man dot ac dot uk
- Subject: Re: ld -shared
- From: DJ Delorie <dj at delorie dot com>
- Date: Fri, 26 May 2000 12:32:45 -0400
- CC: cygwin at sourceware dot cygnus dot com
- References: <200005261245.NAA66045@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@sourceware.cygnus.com