EDM FAQ: The linkdef file


A linkdef file is used by our software build procedures in the codegen phase to create a class "dictionary" used by the ROOT Object I/O system. For each StorableObject class, one must have a single linkdef file which refers to that one class. The file must be named according to the name of the class, for instance ToyMuon_linkdef.h for the ToyMuon class. In simple Offline packages (no sub-directories in the package's include directory), the linkdef file is located in the package sub-directory called "dict". The contents of the file for the class ToyMuon are:

#ifdef __CINT__
#pragma link off all    globals;
#pragma link off all    classes;
#pragma link off all    functions;

#pragma link C++ class  ToyMuon-;
#endif
To set up the dictionary generation and utilization up from scratch in a new package takes a few more steps. One may want to look at the following files as examples:


Comments on this page may be sent to Rob Kennedy