Dynamically linking multiple copies

James Stern jsternitg@yahoo.com
Mon Aug 23 14:30:00 GMT 1999


This is a follow-up to my prior question on dynamic
linking.  I mastered Mumit Khan's dllwrap (Thank you,
Mumit) in a test program but just hit a roadblock when
I tried to dllwrap my production system.

The production system has 30+ libraries.  Presently,
all are statically linked but I want to link them
dynamically.

I chose one of the 30+ libraries at random
("libaction") and tried to dllwrap it (to create
libaction.a and libaction.dll).

However, dllwrap failed because the library has some
unresolveds from other libraries.

This is in keeping with a reply of Mumit's, which said
that each dynamic library needed to be self-contained.

But it leaves me with a problem.  Do I have to chase
down the libraries libaction.a needs (and the
libraries they need, and the libraries they need, and
so on) and add the appropriate -l options when I build
libaction.a?  Or can I just write a gawk program to
declare the missing functions __declspec (dllimport)
without worrying which libraries they come from?

I understand that I'll have to supply all the right
libraries when I link the main program.  That's ok.  I
just don't want to compute the dependencies for each
of 30+ libraries.

I was about to write the above-mentioned gawk program
myself when I hit another roadblock.  How do I tell
the difference between an undefined function and an
undefined extern variable?  'nm' marks them both 'U'. 
I need to distinguish one from the other to write that
gawk script.

Thank you.

===
-- 
Opinions expressed above are not necessarily my employer's.
James M. Stern
ITG Inc.  Culver City, CA (213) 270-7955
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list