Dear experts
I made a customized TObject called IDriftElectrons
and here is what in IDriftElectron_LinkDef.h
#ifdef __CINT__
#pragma link C++ class COMET::IDriftElectron+;
#pragma link C++ class COMET::IDriftElectronContainer+;
#pragma link C++ class std::vector<COMET::IDriftElectron*>+;
#pragma link C++ class IHandle::<COMET::IDriftElectron>+;
#pragma link C++ class IHandle::<COMET::IDriftElectronContainer>+;
#endif
but when I made a app to read this IDriftElectron
and compile it gives the error:
CMakeFiles/xt_check.dir/app/xt_check.cxx.o:(.rodata._ZTVN5COMET7IHandleINS_14IDriftElectronEEE[_ZTVN5COMET7IHandleINS_14IDriftElectronEEE]+0x1e0): undefined reference to `COMET::IHandle<COMET::IDriftElectron>::Streamer(TBuffer&)'
CMakeFiles/xt_check.dir/app/xt_check.cxx.o:(.rodata._ZTVN5COMET7IHandleINS_23IDriftElectronContainerEEE[_ZTVN5COMET7IHandleINS_23IDriftElectronContainerEEE]+0x1e0): undefined reference to `COMET::IHandle<COMET::IDriftElectronContainer>::Streamer(TBuffer&)'
CMakeFiles/xt_check.dir/app/xt_check.cxx.o: In function `COMET::IHandle<COMET::IDriftElectron>::IsA() const':
xt_check.cxx:(.text._ZNK5COMET7IHandleINS_14IDriftElectronEE3IsAEv[_ZNK5COMET7IHandleINS_14IDriftElectronEE3IsAEv]+0xd): undefined reference to `COMET::IHandle<COMET::IDriftElectron>::Class()'
CMakeFiles/xt_check.dir/app/xt_check.cxx.o: In function `COMET::IHandle<COMET::IDriftElectron>::ShowMembers(TMemberInspector&) const':
xt_check.cxx:(.text._ZNK5COMET7IHandleINS_14IDriftElectronEE11ShowMembersER16TMemberInspector[_ZNK5COMET7IHandleINS_14IDriftElectronEE11ShowMembersER16TMemberInspector]+0x11): undefined reference to `COMET::IHandle<COMET::IDriftElectron>::Class()'
CMakeFiles/xt_check.dir/app/xt_check.cxx.o: In function `COMET::IHandle<COMET::IDriftElectronContainer>::IsA() const':
xt_check.cxx:(.text._ZNK5COMET7IHandleINS_23IDriftElectronContainerEE3IsAEv[_ZNK5COMET7IHandleINS_23IDriftElectronContainerEE3IsAEv]+0xd): undefined reference to `COMET::IHandle<COMET::IDriftElectronContainer>::Class()'
CMakeFiles/xt_check.dir/app/xt_check.cxx.o: In function `COMET::IHandle<COMET::IDriftElectronContainer>::ShowMembers(TMemberInspector&) const':
xt_check.cxx:(.text._ZNK5COMET7IHandleINS_23IDriftElectronContainerEE11ShowMembersER16TMemberInspector[_ZNK5COMET7IHandleINS_23IDriftElectronContainerEE11ShowMembersER16TMemberInspector]+0x11): undefined reference to `COMET::IHandle<COMET::IDriftElectronContainer>::Class()'
collect2: error: ld returned 1 exit status
I’m not sure if these errors are caused by missing of includes, or CMakeList.txt, any advice please?
What I included:
#include <TROOT.h>
#include <TFile.h>
#include <TTree.h>
#include <TH2.h>
#include <TH1.h>
#include <TCanvas.h>
#include <TApplication.h>
#include "cometEventLoop.hxx"
#include "IHandle.hxx"
#include "IDriftElectron.hxx"
#include "ICOMETEvent.hxx"