Creating two dlls
Mumit Khan
khan@xraylith.wisc.EDU
Sat Jul 31 18:34:00 GMT 1999
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
More information about the Cygwin
mailing list