I’ve developed a code responsible for reconstruction of tracks for my physics analysis. However, when I’m invoking methods implemented in classes, during the ACLiC linking such an error occurs:
StPP2PPReconstruction_cxx_ACLiC_dict.cxx:(.text+0x20c2): undefined reference to `StPP2PPElasticEvent::setTrack(int const&, StPP2PPTrack*)'
StPP2PPReconstruction_cxx_ACLiC_dict.cxx:(.text+0x20cf): undefined reference to `StPP2PPElasticEvent::getTrack(int const&) const'
collect2: ld returned 1 exit status
Error in <ACLiC>: Compilation failed!
The piece of code responsible for this error:
StPP2PPElasticEvent* a = new StPP2PPElasticEvent();
StPP2PPTrack* b = new StPP2PPTrack();
Int_t index = 0;
a->setTrack(index, b);
a->getTrack(index);
I will be very grateful for any help. I’m also attaching files with class StPP2PPElasticEvent;
You don’t say how you invoke ACLiC, but I suspect you try to make it compile the header. Since your header only contains the declarations, not the definitions this fails. What you really want to do is compile the source file (and make sure to include the header there which you did).