TTree and user classes


I wonder if a user-defined class has to be dynamic to be loaded by the interpreter and used to set up a TTree containing user-defined objects. I got this error on runtime in my application.

Error in TTree::Bronch: Cannot find class:MyClass

and the TTree is obvioulsy not filled.

I mention that I use ROOT in a standalone application and that I do not want to use CINT to compile it. Is there some dictionary generation command that I can put in a makefile so that the ROOT instance will find the definition of MyClass? I saw this page

but I wonder if it is what I am looking for or not.



To Create a Tree, or more generally do I/O, you must create a dictionary
for the classes involved in the I/O.
Creating a dictionary requires running rootcint on your header file(s),
compile the generated code and link it in a shared library together
with your class.
We give examples in the $ROOTSYS/test directory makefile.
See for example how the Event class is used in the test MainEvent.