I want to extend features of a histogram by inherit the TH1F class by the CTrack. I defined my class CTrack : public TH1F in CTrack.h and I implement it in CTrack.cpp. I wrote default constructor, copy constructor, I added ClassImp and ClassDef macros. I created LinkDef.h file. After compilation I’ve got libCTrack.so. When I want to use it in ROOT by .L libCTrack.so I have an error:
dlopen error: ./libCTrack.so: undefined symbol: _ZN4TH1F11ShowMembersER16TMemberInspector
Load Error: Failed to load Dynamic link library ./libCTrack.so
*** Interpreter error recovered ***
Can anybody help me?
I attached a very simple version of my class. CTrack.tar.gz (40.1 KB)
Your compilation is not complete.
You have to create an output file for your dictionary and include this in the compilation of the library.
This is the modified Makefile that worked for me (sorry for messing up with your short cuts):