dpiparo,
thx for the reply and the tip on the ClassImp.
i remember genreflex is not recommended? Anyway, i do have dictionary files. i generate it with rootcling
here’s the link def file i have:
//// LinkDef.h
#if defined(__CLING__) || defined(__CINT__)
#pragma link C++ defined_in AVP.hpp ;
#endif
below is how i generate the dictionary and compile it:
rootcling -v -f LinkDef.cpp -c -p AVP.h LinkDef.h
g++ -c -o LinkDef.o LinkDef.cpp `root-config --cflags --libs`
I can either create the shared lib or executable as long as i link against the LinkDef.o. If i don’t link with the LinkDef.o there will be missing symbols for dictionary. The problem is I can gSystem->Load the so file and add branch to tree and fill and save/read tree w/o issue, but i can’t do it with the executable, it will just core dump when adding branch and return those error msgs. I placed the source/header/LinkDef/dictionary/pcm/so/executable… all in the same directory just in case it’s because of the missing pcm, or header, or other things. I do have a ROOT_INCLUDE env variable that doesn’t contains the directory where i put all those test codes in but that shouldn’t matter, right?
I did try to use the genreflex to generate the dictionary and compile the . The only “real” difference I see is this line:
genreflex has it, rootcling doesn’t.
// Function generating the singleton type initializer
static TGenericClassInfo *GenerateInitInstanceLocal(const ::AVP*)
{
::AVP *ptr = 0;
static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy< ::AVP >(0);
static ::ROOT::TGenericClassInfo
instance("AVP", ::AVP::Class_Version(), "invalid", 26,
typeid(::AVP), ::ROOT::Internal::DefineBehavior(ptr, ptr),
&::AVP::Dictionary, isa_proxy, 16,
sizeof(::AVP) );
instance.SetNew(&new_AVP);
instance.SetNewArray(&newArray_AVP);
instance.SetDelete(&delete_AVP);
instance.SetDeleteArray(&deleteArray_AVP);
instance.SetDestructor(&destruct_AVP);
instance.SetStreamerFunc(&streamer_AVP);
return &instance;
}
is genreflex is really needed? it wasn’t for root5…