Trying to build ROOT-ified library

ROOT Version: 6.26/10

I get the following error when loading the library using

root
root [0] gSystem->Load("libDummy.so")
cling::DynamicLibraryManager::loadLibrary(): /path/to/DummyLib/install/lib/libDummy.so: undefined symbol: _ZN4ROOT20GenerateInitInstanceEPK6SClass

CMakeLists.txt (1.5 KB)
SClass.h (431 Bytes)
SClass.cxx (145 Bytes)

I have another file SClass_LinkDef.h but I cannot attach it. It contains the following:

#ifdef __CINT__
#pragma link C++ class SClass+;
#endif

Do you know what can be the source of the error?

Thanks!

Ok, I was not adding the dictionary to the target

It was enough to add

target_sources(Dummy PRIVATE CustomClassesDict.cxx)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.