This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: How to build a DLL
- To: Fabio Tamburini <tamburin at cilta dot unibo dot it>
- Subject: Re: How to build a DLL
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Mon, 17 Jul 2000 11:11:37 -0400
- CC: cygwin at sources dot redhat dot com
- References: <3972D35F.16FC8C7B@cilta.unibo.it>
Fabio Tamburini wrote:
>
> Hi
> I am a novice of cygwin and I am wondering if it is possible to compile
> a lib???.a archive into
> a DLL library using the cygwin environment.
> How can I do that? Is there a tutorial on it?
>
> Thanks...
>
> Please answer directly using my email.
>
Please search the mail archives; this question has been asked many times
in the past. Also, see Mumit Khan's web page (there's a link to it on
the Cygwin web page/'related links').
Short version:
mkdir foo
cd foo
cp lib????.a .
ar x lib????.a
gcc -shared -Wl,--enable-auto-image-base *.o -o lib????.dll
-Wl,--out-implib=lib????.dll.a
This creates a dll and an import lib. BTW, gcc *actually* delegates this
job to the linker ld.exe, and the in official version
(binutils-20000625) these features are broken. You can get a patched
version of ld.exe at
http://cygutils.netpedia.net/V1.1/linker/ld.exe.tar.gz
--Chuck
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com