Re: How about objects in DLL's

Rene Brun (Rene.Brun@cern.ch)
Thu, 05 Nov 1998 08:22:25 +0100


Mark Bracey wrote:
>
> >From what I understand, CINT can use objects in DLL's.
>
> If this is true, does anyone have any examples of how CINT does this and
> how/where in the source the mapping between the DLL and it's exposed
> functions and the class description is performed?
>
> Thanks,
> Mark

You can find an example in $ROOTSYS/test/Event.
This example shows how to create your own class (files Event.h,
Event.cxx), make a DLL.
To invoke the DLL from an interactive session:
Root > gSystem->Load("libEvent");
Root > Event myevent;

To be able to call your classes interactively, you have to run
your class header files through the preprocessor rootcint.
rootcint generates the C++ code that makes the interactive interface
to the compiled code.

Rene Brun