#ifdef __MAKECINT__
#pragma link off all class;
#pragma link off all function;
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ enum class Definitions::WorkEnum_t;
#endif
My goal is to add Definitions::WorkEnum_t to Root, but not the whole namespace Definitions (other members are defines in other .hh files).
rootcint generators errors:
rootcint -f src/WorkEnum_tDict.cc -rmf lib/WorkEnum_t.rootmap -c interface/WorkEnum_t.hh linkdef/WorkEnum_tLinkDef.h
In file included from input_line_11:6:
./interface/WorkEnum_t.hh:6:3: error: expected unqualified-id
ClassDef(WorkEnum_t, 1)
...
root [0] gSystem -> Load("/path/to/libexternal.so")
Definitions::WorkEnum_t k
ROOT_prompt_1:1:1: error: 'Definitions' is not a class, namespace, or enumeration
Definitions::WorkEnum_t k
^
ROOT_prompt_1:1:1: note: 'Definitions' declared here
// some C++ header definition
#ifdef __MAKECINT__
// turns off dictionary generation for all
#pragma link off all class;
#pragma link off all function;
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
//#pragma link C++ enum class Definitions::WorkEnum_t;
#pragma link C++ namespace Definitions;
#endif
I advanced a bit further (by loading other prerequisite libraries). Now Definitions is visible in cling, but ROOT says “I see it but I don’t know what it is”.
root [0] Def
DefAplGivens
DefGivens
DefHouseHolder
DefaultErrorHandler
Definitions
root [0] Definitions::Error in <TClass::LoadClassInfo>: no interpreter information for class Definitions is available even though it has a TClass initialization routine.
Definitions::WorkEnum_t k
ROOT_prompt_0:1:1: error: 'Definitions' is not a class, namespace, or enumeration
Definitions::WorkEnum_t k
^
ROOT_prompt_0:1:1: note: 'Definitions' declared here
From this specific error message can you suggest what to check/fix?
Would it help if I gave you the contents of WorkEnum_t.rootmap, WorkEnum_tDict.oWorkEnum_tDict_rdict.pcm and WorkEnum_tDict.cc or can you suggest specific things what to look at in these files?
There is another error from compilation with CMSSW scram that could suggest the root of this problem. WorkEnum_tDict_rdict.pcm is placed in the lib directory of the external directory.
Error in <TCling::RegisterModule>: cannot find dictionary module WorkEnum_tDict_rdict.pcm
*** Error in `python': corrupted size vs. prev_size: 0x000000000533fba0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x80c37)[0x7f83d1c31c37]
/lib64/libc.so.6(+0x82135)[0x7f83d1c33135]
/lib64/libc.so.6(__libc_malloc+0x4c)[0x7f83d1c3678c]
/cvmfs/cms.cern.ch/slc7_amd64_gcc630/external/gcc/6.3.0/lib64/libstdc++.so.6(_Znwm+0x18)[0x7f83d0d958c8]
/cvmfs/cms.cern.ch/slc7_amd64_gcc630/cms/cmssw/CMSSW_9_4_11/external/slc7_amd64_gcc630/lib/libCling.so(_ZN5cling17IncrementalParser18getAllTransactionsEv+0x94)[0x7f83cc27f804]
/cvmfs/cms.cern.ch/slc7_amd64_gcc630/cms/cmssw/CMSSW_9_4_11/external/slc7_amd64_gcc630/lib/libCling.so(_ZN5cling11Interpreter29runAndRemoveStaticDestructorsEv+0x22)[0x7f83cc22cf32]
I have now progressed further and with a testfunc I manage to wake up Definitions:
root [1] Definitions::WorkEnum_t k
ROOT_prompt_1:1:1: error: 'Definitions' is not a class, namespace, or enumeration
Definitions::WorkEnum_t k
^
ROOT_prompt_1:1:1: note: 'Definitions' declared here
root [2] testfunc()
testfunc
root [3] Definitions::WorkEnum_t k
(Definitions::WorkEnum_t) (Definitions::WorkEnum_t::RECO) : (int) 0