This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Creating two dlls
- To: Radu Grosu <grosu@saul.cis.upenn.edu>
- Subject: Re: Creating two dlls
- From: Mumit Khan <khan@xraylith.wisc.EDU>
- Date: Fri, 30 Jul 1999 13:03:57 -0500
- cc: cygwin@sourceware.cygnus.com
Radu Grosu <grosu@saul.cis.upenn.edu> writes:
> I want to create two dll libraries. The second depends on the first.
>
> I create the first one by adapting your make file for creating a dll and
>
> it works. I am exporting all symbols with --export-all-symbols.
>
> Then I want to create the second dll. Functions in the second one refer
> to symbols in the first dll. Although I exported the symbols in the
> first dll and I am importing the first dll I still get a lot of
> references undefined to the symbols in the first dll.
>
> What goes wrong?
>
You don't provide enough information to know for sure, but if I had to
guess, I'd say you're not creating import library for the first one.
Here's the sequence for 2 dlls, where dll2 depends on dll1.
1. Create dll1.dll and create libdll1.a (import library)
2. Create dll2.dll and provide libdll1.a on the link line to resolve the
references from dll1.dll.
$ dllwrap -o dll1.dll --export-all --output-lib libdll1.a \
[list of object files and libraries]
$ dllwrap -o dll2.dll --export-all --output-lib libdll2.a \
[list of object files and libraries] libdll1.a
Of course, if you use dllimport/dllexport attributes (or via declspec)
to tag imported/exported symbols, you don't need --export-all.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com