> -----Original Message----- > From: Bob Friesenhahn [mailto:[EMAIL PROTECTED] > Sent: Friday, December 30, 2005 1:33 PM > To: Eric Lemings > Cc: 'libtool@gnu.org' > Subject: RE: libltdl examples > > > On Fri, 30 Dec 2005, Eric Lemings wrote: > >>> Do any of these use C++ as their primary language? And > >> does libltdl > >>> work the same even if the package is configured with > >> --disable-shared? > >> > >> The main issues with C++ are platform limitations with C++ static > >> initialization and the usefulness of exporting symbols > that need to > >> be resolved as C language symbols so they are not subject to > >> mangling. > > > > What I'm really looking for is a good example of a package > written in > > C++ that uses libltdl to load libraries at run-time. How > they do it, > > problems to watch out for, etc. > > You use the term "libraries". Do you intend to load a > "library" so it > extends the available global symbol space,
No. > or do you intend to load a > "module" and use libltdl to obtain the address of functions at > run-time? Yes. I'm writing a library (or collection of libraries really) that has a "front end" interface library and several "back end" implementation libraries. The front end basically has a single point of entry: a factory method that accepts a string that identifies a particular back end. The back end library is then dynamically loaded and used to create the appropriate environment object. Note, multiple back ends can be in use at the same time. All other objects are allocated at run-time from this environment and all other functions are accessed from the allocated objects. Sounds like a good design. I just wonder if it will really work in C++. Eric. _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool