This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Creating two dlls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]