Re: [ROOT] Library using class from a different library

From: cstrato@EUnet.at
Date: Sun Jan 28 2001 - 20:10:58 MET


Dear Fons and Valery

Thank you for your answer. Foreward declaration of the classes works as you
suggested.However, in a macro, you have to load both libaries.

I am sorry, that I did not formulate my question correctly:
I would like achieve the situation that the user has only to call the main
library LibB.so in his macro.
Is it possible that LibB.so loads LibA.so?
How could I do this?

Thank you in advance

Best regards
C.h.r.i.s.t.i.a.n  S.t.r.a.t.o.w.a
Vienna, Austria

Fons Rademakers wrote:

> Hi Christian,
>
>    this will work fine on all platforms I know of, except on Windows
> and AIX. On Windows and AIX a .so needs to resolve all symbols at .so
> link time and that would not be possible in this case. A typical solution
> would be to call the classes in the other lib via an abstract interface, etc.
>
> Cheers, Fons.
>
> On Fri, Jan 26, 2001 at 07:44:34PM +0100, cstrato@EUnet.at wrote:
> > Dear Rooters
> >
> > I would like to build two libraries. Both contain custom classes derived
> > from TObject.
> > LibA.so contains classes ClassA and ClassB
> > LibB.so contains classes Class1 and Class2.
> >
> > What do I have to include in  LibB.so, if methods of LibB.so use ClassA
> > or ClassB from LibA.so?
> >
> > Thank you for your help.
> >
> > Best regards
> > C.h.r.i.s.t.i.a.n  S.t.r.a.t.o.w.a
> > Vienna, Austria
>
> --
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
> WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:34 MET