| delorie.com/archives/browse.cgi | search | 
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm | 
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com | 
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> | 
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> | 
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, | 
| <http://sourceware.cygnus.com/ml/#faqs> | |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com | 
| Message-Id: | <199907301803.NAA31442@mercury.xraylith.wisc.edu> | 
| To: | Radu Grosu <grosu AT saul DOT cis DOT upenn DOT edu> | 
| cc: | cygwin AT sourceware DOT cygnus DOT com | 
| Subject: | Re: Creating two dlls | 
| In-Reply-To: | Your message of "Fri, 30 Jul 1999 13:48:13 EDT." | 
| <37A1E55D DOT B2D695B1 AT saul DOT cis DOT upenn DOT edu> | |
| Date: | Fri, 30 Jul 1999 13:03:57 -0500 | 
| From: | Mumit Khan <khan AT xraylith DOT wisc DOT EDU> | 
Radu Grosu <grosu AT saul DOT cis DOT upenn DOT 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 AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |