ROOT6: defined_in in linkdef


I have collected a bunch of classes (inherited from TObject) in a file for which I generate dictionaries using the linkdef line

#pragma link C++ defined_in MyFile.hh;

The resulting dictionary file In ROOT 5 is very long and contains especially the Streamer and Class functions for each of my classes.
When I perform exactly the same steps with ROOT 6 (master from git) I, get a very short dictionary, which doesn’t mention my classes at all.
When I add the linkdef line

#pragma link C++ class MyNameSpace::MyClass;

I get at least the the dictionary of MyClass, but I do not want to add dozens of lines which I have to sync with the classes.
Is this a regression from 5->6 or do I have to change the defined_in line?


Hi Jan,

what ROOT version are you using?
I tried v6.05/02 with these header, linkdef and rootcling command and could find back all dictionaries.

#pragma link C++ defined_in MyFile.hh;


#ifndef _MYFILE_H_
#define _MYFILE_H_
class A{};
class B{};
class C{};
namespace theNS{
class A{};
class B{};
class C{};


rootcling -f MyFile_dict.cxx -rmf al.rootmap  MyFile.hh LinkDef.h
g++ -shared -fPIC -o MyFile_dict.cxx `root-config --cflags --libs`
root -l
root [0] TClass::GetClass("A")->HasDictionary()
(Bool_t) true
root [1] TClass::GetClass("theNS::A")->HasDictionary()
(Bool_t) true