Hi Folks,
        I have been using libtool for a while to develop some middleware
libraries.  Those libraries use ltdl to dlopen some modules themselves.
        I've been kind of bumbling along with libtool, wanting to be able to
easily build static versions of programs that use these libraries, but
having to jump through various hoops to do it.  I recently started using the
CVS version of libtool and discovered better support for -dlopen for
libraries.  However, I'm still a bit short of where I want to be and I was
wondering if that is a result of some unrecognized implementation
difficulties or just my own misunderstanding of libtool.  If the latter, I'm
hopeful that someone can explain the situation to me.
        My impression of how things stand now is that libtool does support
creating static versions of programs that use libraries that dlopen(), but:
1) the final program (not the library calling dlopen() must include the
LTDL_SET_PRELOADED_SYMBOLS() macro call, and 2) the program must be linked
using libtool.  If I'm wrong about these, please fill me in on what I should
be doing.  
        If I've got this correct and these things must be done, then am I
right in judging that these are awkward requirements?  With respect to 1,
the ltdl.h include file is required for the construction of the library, but
it seems awkward for the program (which does no dlopen()s) to have to
build libltdl or otherwise acquire ltdl.h so it can use the macro.
Requirement 2 also seems awkward.  Generally libraries produced via libtool
are linkable without using libtool (so long as the dependencies are taken
care of).  Requiring libtool to link any program using the library is
significantly more restrictive.
        As an alternative to these, is it possible that libtool could
produce the preloaded symbol information and a function to be used within
the library to initialize using lt_dlpreload()?  (That would be produced for
the .a library version.  For the .so the function could have a null body.)
Might something like this even be in the works?  Or it is not a good idea
because of some shared library arcana that I'm ignorant of?

thanks for your consideration (and thanks for libtool),
greg

-----------------------------------------------------------------------------
greg eisenhauer         [EMAIL PROTECTED]     (404)894-3227
http://www.cc.gatech.edu/~eisen/
College of Computing, Georgia Institute of Technology, Atlanta, GA  30332

Reply via email to