Undefined reference to

i’ve upgraded root root version 3.10 (it was a 3.02) and now i’m not able to link the program
this is the log
creating libyodaraw.la
(cd .libs && rm -f libyodaraw.la && ln -s …/libyodaraw.la libyodaraw.la)
c++ -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/event -I/usr/share/root/include -g -c rawreader.cpp
/bin/sh …/libtool --mode=link c++ -g /usr/share/root/lib/root/libHist.so /usr/share/root/lib/root/libMatrix.so /usr/share/root/lib/root/libTree.so /usr/share/root/lib/root/libCore.so /usr/share/root/lib/root/libCint.so /usr/share/root/lib/libCore.so -ldl -o rawreader rawreader.o libyodaraw.la …/event/libyoda.la -llog4cpp
c++ -g /usr/share/root/lib/root/libHist.so /usr/share/root/lib/root/libMatrix.so /usr/share/root/lib/root/libTree.so /usr/share/root/lib/root/libCore.so /usr/share/root/lib/root/libCint.so /usr/share/root/lib/libCore.so -o .libs/rawreader rawreader.o ./.libs/libyodaraw.so …/event/.libs/libyoda.so /home/kusanagi/yoda2/sample/.libs/libsample.so -ldl /usr/local/lib/liblog4cpp.so -lnsl -Wl,–rpath -Wl,/usr/local/lib
…/event/.libs/libyoda.so: undefined reference to TBuffer::ReadObjectAny(TClass const*)' ./.libs/libyodaraw.so: undefined reference toROOT::TGenericClassInfo::SetDelete(void ()(void))’
./.libs/libyodaraw.so: undefined reference to TObject::Copy(TObject&) const' ../event/.libs/libyoda.so: undefined reference toTBuffer::WriteObjectAny(void const*, TClass*)’
./.libs/libyodaraw.so: undefined reference to ROOT::TGenericClassInfo::SetDeleteArray(void (*)(void*))' ./.libs/libyodaraw.so: undefined reference toROOT::TGenericClassInfo::SetNew(void* ()(void))’
./.libs/libyodaraw.so: undefined reference to ROOT::TGenericClassInfo::SetNewArray(void* (*)(long))' ./.libs/libyodaraw.so: undefined reference toTObject::operator delete
./.libs/libyodaraw.so: undefined reference to ROOT::TGenericClassInfo::TGenericClassInfo[in-charge](char const*, int, char const*, int, std::type_info const&, ROOT::TInitBehavior const*, void (*)(), TClass* (*)(void const*), int)' ./.libs/libyodaraw.so: undefined reference toROOT::TGenericClassInfo::SetDestructor(void ()(void))'
collect2: ld returned 1 exit status
make[2]: *** [rawreader] Error 1
make[2]: Leaving directory /home/kusanagi/.gnome-desktop/yoda2/raw' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/kusanagi/.gnome-desktop/yoda2’
make: *** [all-recursive-am] Error 2

where is the mistake??? i’m supposing that solve the first undefined reference to TBuffer will solve lot of this but where is the mistake?

Did you try
make distclean
make
after having the problem?

Cheers, Ilka

yes… done… nothing changed… i also linked all the ROOT/lib and ROOT/lib/root *.so files…

to be clear… now that i’ve added al the *.so library in ROOT/lib and ROOT/lib/root directories i’ve this error…

/usr/share/root/lib/libMC.so: undefined reference to ROOT::TGenericClassInfo::TGenericClassInfo[in-charge](char const*, int, char const*, int, std::type_info const&, ROOT::TInitBehavior const*, void (*)(), int)' /usr/share/root/lib/libMC.so: undefined reference toTObject::Copy(TObject&)’
/usr/share/root/lib/libMC.so: undefined reference to TNamed::Copy(TObject&)' collect2: ld returned 1 exit status make[2]: *** [rawreader] Error 1 make[2]: Leaving directory/home/kusanagi/.gnome-desktop/yoda2/raw’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kusanagi/.gnome-desktop/yoda2’
make: *** [all-recursive-am] Error 2

the result is the same … it doesn’t link.

Cheers, Maurizio

libMC.so should not exist at all in 3.10/02.
The old directory mc is now called vmc and the corresponding library: libVMC.so

Delete this library libMC.so.
Did you really made a
make distclean
make

Rene

thanks for the suggest but this is the result…

make[2]: Entering directory /home/kusanagi/.gnome-desktop/yoda2/raw' /bin/sh ../libtool --mode=link c++ -g /usr/share/root/lib/libCint.so /usr/share/root/lib/libCore.so /usr/share/root/lib/libMatrix.so /usr/share/root/lib/libNew.so /usr/share/root/lib/libHist.so /usr/share/root/lib/libTree.so /usr/share/root/lib/libGraf.so /usr/share/root/lib/libGraf3d.so /usr/share/root/lib/libGpad.so /usr/share/root/lib/libGui.so /usr/share/root/lib/libMinuit.so /usr/share/root/lib/libHistPainter.so /usr/share/root/lib/libProof.so /usr/share/root/lib/libTreePlayer.so /usr/share/root/lib/libTreeViewer.so /usr/share/root/lib/libPhysics.so /usr/share/root/lib/libPostscript.so /usr/share/root/lib/libRint.so /usr/share/root/lib/libHtml.so /usr/share/root/lib/libEG.so /usr/share/root/lib/libGeom.so /usr/share/root/lib/libGeomPainter.so /usr/share/root/lib/libGX11.so /usr/share/root/lib/libX3d.so /usr/share/root/lib/libThread.so /usr/share/root/lib/root/libCint.so /usr/share/root/lib/root/libCore.so /usr/share/root/lib/root/libEG.so /usr/share/root/lib/root/libGeomPainter.so /usr/share/root/lib/root/libGeom.so /usr/share/root/lib/root/libGpad.so /usr/share/root/lib/root/libGraf3d.so /usr/share/root/lib/root/libGraf.so /usr/share/root/lib/root/libGui.so /usr/share/root/lib/root/libGX11.so /usr/share/root/lib/root/libHistPainter.so /usr/share/root/lib/root/libHist.so /usr/share/root/lib/root/libHtml.so /usr/share/root/lib/root/libMatrix.so /usr/share/root/lib/root/libMinuit.so /usr/share/root/lib/root/libNew.so /usr/share/root/lib/root/libPhysics.so /usr/share/root/lib/root/libPostscript.so /usr/share/root/lib/root/libProof.so /usr/share/root/lib/root/libRint.so /usr/share/root/lib/root/libThread.so /usr/share/root/lib/root/libTreePlayer.so /usr/share/root/lib/root/libTree.so /usr/share/root/lib/root/libTreeViewer.so /usr/share/root/lib/root/libX3d.so /usr/share/root/lib/libASImage.so /usr/share/root/lib/libFumili.so /usr/share/root/lib/libGX11TTF.so /usr/share/root/lib/libMLP.so /usr/share/root/lib/libProofGui.so -ldl -o rawreader rawreader.o libyodaraw.la ../event/libyoda.la -llog4cpp c++ -g /usr/share/root/lib/libCint.so /usr/share/root/lib/libCore.so /usr/share/root/lib/libMatrix.so /usr/share/root/lib/libNew.so /usr/share/root/lib/libHist.so /usr/share/root/lib/libTree.so /usr/share/root/lib/libGraf.so /usr/share/root/lib/libGraf3d.so /usr/share/root/lib/libGpad.so /usr/share/root/lib/libGui.so /usr/share/root/lib/libMinuit.so /usr/share/root/lib/libHistPainter.so /usr/share/root/lib/libProof.so /usr/share/root/lib/libTreePlayer.so /usr/share/root/lib/libTreeViewer.so /usr/share/root/lib/libPhysics.so /usr/share/root/lib/libPostscript.so /usr/share/root/lib/libRint.so /usr/share/root/lib/libHtml.so /usr/share/root/lib/libEG.so /usr/share/root/lib/libGeom.so /usr/share/root/lib/libGeomPainter.so /usr/share/root/lib/libGX11.so /usr/share/root/lib/libX3d.so /usr/share/root/lib/libThread.so /usr/share/root/lib/root/libCint.so /usr/share/root/lib/root/libCore.so /usr/share/root/lib/root/libEG.so /usr/share/root/lib/root/libGeomPainter.so /usr/share/root/lib/root/libGeom.so /usr/share/root/lib/root/libGpad.so /usr/share/root/lib/root/libGraf3d.so /usr/share/root/lib/root/libGraf.so /usr/share/root/lib/root/libGui.so /usr/share/root/lib/root/libGX11.so /usr/share/root/lib/root/libHistPainter.so /usr/share/root/lib/root/libHist.so /usr/share/root/lib/root/libHtml.so /usr/share/root/lib/root/libMatrix.so /usr/share/root/lib/root/libMinuit.so /usr/share/root/lib/root/libNew.so /usr/share/root/lib/root/libPhysics.so /usr/share/root/lib/root/libPostscript.so /usr/share/root/lib/root/libProof.so /usr/share/root/lib/root/libRint.so /usr/share/root/lib/root/libThread.so /usr/share/root/lib/root/libTreePlayer.so /usr/share/root/lib/root/libTree.so /usr/share/root/lib/root/libTreeViewer.so /usr/share/root/lib/root/libX3d.so /usr/share/root/lib/libASImage.so /usr/share/root/lib/libFumili.so /usr/share/root/lib/libGX11TTF.so /usr/share/root/lib/libMLP.so /usr/share/root/lib/libProofGui.so -o .libs/rawreader rawreader.o ./.libs/libyodaraw.so ../event/.libs/libyoda.so /home/kusanagi/yoda2/sample/.libs/libsample.so -ldl /usr/local/lib/liblog4cpp.so -lnsl -Wl,--rpath -Wl,/usr/local/lib /home/kusanagi/yoda2/sample/.libs/libsample.so: undefined reference toTObject::Copy(TObject&)'
collect2: ld returned 1 exit status
make[2]: *** [rawreader] Error 1
make[2]: Leaving directory /home/kusanagi/.gnome-desktop/yoda2/raw' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/kusanagi/.gnome-desktop/yoda2’
make: *** [all-recursive-am] Error 2

Cheers, Maurizio

It looks like you are mixing incompatible versions of ROOT
or code compiled with different compiler options, eg gcc2.96 with gcc3.2

Please give more details

Rene

you are right Rene. I passed from gcc version 2.92 to 3.2. To be honest my machine (Mandrake 9.0 - gcc 3.2 - Root 2.10) it’s in a mess… in the week end i’ll try to cleanup it and install Linux from the start using a Mandrake 9.2 (the same for recent version of gcc and Root).
All the troubles started because that this software has been developed 2 years ago (on a Mandrake 8.x - gcc 2.9 - Root 2.03) and now needs to be runned on a more recent machine.

ciao,
Maurizio

ok… new linux new problems in linking phase, compiling phase is ok.
I guess it could be something in the LinkDef.h but i may be wrong…i’m sorry if i look so newbie… some hints?

./.libs/libyodacern.so: undefined reference to pamela::tracker::TrackerEvent::Class()' ./.libs/libyodacern.so: undefined reference topamela::anticoinc::AnticounterEvent::AnticounterEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::anticoinc::AnticounterEvent::Class()' ./.libs/libyodacern.so: undefined reference topamela::tracker::AdcData::AdcDatain-charge
./.libs/libyodacern.so: undefined reference to pamela::tracker::AdcData::~AdcData [in-charge]()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterEvent::Class()’
./.libs/libyodacern.so: undefined reference to pamela::tracker::TrackerEvent::Cleanup()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterEvent::CalorimeterEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::calorimeter::CalorimeterEvent::Set(int, short*)' ./.libs/libyodacern.so: undefined reference topamela::tracker::AdcData::AddValue(int, int)’
./.libs/libyodacern.so: undefined reference to `pamela::tracker::TrackerEvent::TrackerEventin-charge

Hi,

It looks like you might be missing the dictionary for the class mentioned in the error message (i.e pamela::tracker::TrackerEvent and al).

Cheers,
Philippe.

no… the dictionary exist… this is the situation for example for the calorimeter (the errors on other classes i suppose have the same base)

------->CalorimeterEvent.h<---------
#ifndef CALORIMETER_EVENT_H
#define CALORIMETER_EVENT_H

#include

#include <TObject.h>

#include “event/SubPacket.h”

namespace pamela {
/**

  • Namespace for all calorimeter related code.
    /
    namespace calorimeter {
    /
    *
    • Raw calorimeter data.
      /
      class CalorimeterEvent: public pamela::SubPacket {
      private:
      Short_t SelfTrig[6];
      Short_t Coincidence;
      Int_t NValue;
      Short_t
      Value; //[NValue]
      public:
      CalorimeterEvent(void);
      ~CalorimeterEvent(void);
      void Set(int nvalue, short* value);
      const short* GetSelfTrig(void) const { return SelfTrig; }
      short GetCoincidence(void) const { return Coincidence; }
      int GetNValue(void) const { return NValue; }
      const short* GetValue(void) const { return Value; }
      // … and the setters …
      ClassDef(CalorimeterEvent, 1)
      };
      }
      }
      #endif /* CALORIMETER_EVENT_H */

------>CalorimeterEvent.cpp<---------
-#include “CalorimeterEvent.h”

using namespace pamela;
using namespace pamela::calorimeter;

CalorimeterEvent::CalorimeterEvent(void):
SubPacket(“Raw”, PacketType::Physics, SubDetector::Calorimeter) {
NValue = 0;
Value = new Short_t[1055];
}

CalorimeterEvent::~CalorimeterEvent(void) {

}

void CalorimeterEvent::Set(int nvalue, short* value) {
delete Value;
Value = new Short_t[nvalue];
for (int i = 0; i < nvalue; i++) {
Value[i] = value[i];
}
NValue = nvalue;
}

ClassImp(CalorimeterEvent)

------>LinkDef.h<---------
#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link off all typedef;
#pragma link C++ nestedtypedef;
#pragma link C++ nestedclass;
#pragma link C++ namespace pamela::calorimeter;
#pragma link C++ class pamela::calorimeter::CalorimeterEvent+;

#endif

The class CalorimeterEvent is used in another file, the CalorimeterReader.h

#include “cern/CernAlgorithm.h”
#include “event/PamelaRun.h”
#include “…/event/CalorimeterEvent.h”

namespace pamela {
namespace calorimeter {
/**
* Algorithm to read cern calorimeter physics events.
/
class CalorimeterReader: public pamela::cern::CernAlgorithm {
private:
/
*
* The physics event that is created in this algorithm.
/
CalorimeterEvent
Calorimeter;
[…]

---->all this compile and link… the trouble raises when i want to use it in this Reader.h<----

#ifndef CERN_READER_ALGORITHM_H
#define CERN_READER_ALGORITHM_H

#include “CernAlgorithm.h”
#include “OrbitalEvent.h”
#include “InclinationEvent.h”
#include “TmtcEvent.h”
#include “PscuEvent.h”
#include “tracker/cern/TrackerReader.h”
#include “anticoinc/cern/AnticounterReader.h”
#include “…/calorimeter/cern/CalorimeterReader.h”

namespace pamela {
namespace cern {
/**
* Event reader algorithm for physics events.
/
class PhysicsReader: public CernAlgorithm {
private:
/
* The reader for tracker physics events. /
pamela::tracker::TrackerReader
TrackerReader;
/** The reader for anticoincidence physics events. /
pamela::anticoinc::AnticounterReader
AcReader;
/** The reader for calorimeter physics events. /
pamela::calorimeter::CalorimeterReader
CalorimeterReader;
public:
PhysicsReader(void);
virtual void Init(pamela::PamelaRun *);
virtual void RunEvent(int);
virtual std::string GetVersionInfo(void) const;
};
}
}

#endif /* CERN_READER_ALGORITHM_H */

  ---->the associated LinkDef.h is<-----

#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link off all typedef;
#pragma link C++ nestedtypedef;
#pragma link C++ nestedclass;
#pragma link C++ namespace pamela;
#pragma link C++ namespace pamela::cern;
#pragma link C++ class pamela::cern::CernAlgorithm+;
#pragma link C++ class pamela::cern::EventReader+;

#endif

the it compile correctly but on link it generate

./.libs/libyodacern.so: undefined reference to pamela::tracker::TrackerEvent::Class()' ./.libs/libyodacern.so: undefined reference topamela::anticoinc::AnticounterEvent::AnticounterEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::anticoinc::AnticounterEvent::Class()' ./.libs/libyodacern.so: undefined reference topamela::tracker::AdcData::AdcDatain-charge
./.libs/libyodacern.so: undefined reference to pamela::tracker::AdcData::~AdcData [in-charge]()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterEvent::Class()’
./.libs/libyodacern.so: undefined reference to pamela::tracker::TrackerEvent::Cleanup()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterEvent::CalorimeterEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::calorimeter::CalorimeterEvent::Set(int, short*)' ./.libs/libyodacern.so: undefined reference topamela::tracker::AdcData::AddValue(int, int)’
./.libs/libyodacern.so: undefined reference to `pamela::tracker::TrackerEvent::TrackerEventin-charge

all the requested Dictionaries are compiled. What about that?

Hi,

In the first linkdef your are missing the line

In the 2 linkdef you sent I did not see mention of
pamela::tracker::TrackerEvent. Also make sure you did implement
pamela::tracker::TrackerEvent::Cleanup AND did load the library definining it.

Cheers,
Philippe

all the function are implemented…

just to show you the scheme i’ve a one LinkDef for each of the XXXEvent i have
The XXXReader is defined in another folder with another Makefile without a LinkDef associated

pamela::tracker::TrackerEvent <------ pamela::tracker::TrackerReader inherit from this one

the linkDef is
#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link off all typedef;
#pragma link C++ nestedtypedef;
#pragma link C++ nestedclass;
#pragma link C++ namespace pamela;
#pragma link C++ namespace pamela::tracker;
#pragma link C++ class pamela::tracker::TrackerEvent+;
#pragma link C++ class pamela::tracker::AdcData+;

#endif

in another folder i define a pamela::cern::PhysicReader which contain a TrackerReader
class PhysicsReader: public pamela::cern::CernAlgorithm {
private:
/** The reader for tracker physics events. /
pamela::tracker::TrackerReader
TrackerReader;

the LinkDef associated with this one is (following your hints)
#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link off all typedef;
#pragma link C++ nestedtypedef;
#pragma link C++ nestedclass;
#pragma link C++ namespace pamela;

#pragma link C++ namespace pamela::tracker; //modifica maurizio 25/02/2004 14:00
#pragma link C++ class pamela::tracker::TrackerEvent+; //modifica maurizio 25/02/2004 14:00

#pragma link C++ namespace pamela::cern;
#pragma link C++ class pamela::cern::EventReader+;
#pragma link C++ class pamela::cern::CernAlgorithm+;
//#pragma link C++ defined_in CernAlgorithm.h; //modifica maurizio
//#pragma link C++ defined_in EventReader.h; //modifica maurizio
//#pragma link C++ defined_in ReaderAlgorithms.h; //modifica maurizio

#endif

the result is the same (or also worst if consider also the new errors)

Making all in cern
make[2]: Entering directory `/home/kusanagi/yoda/cern’
rootcint -f CernDict.cpp -c -I… -I…/event -I/usr/share/root/include CernAlgorithm.h EventReader.h LinkDef.h
/bin/sh …/libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/event -I/usr/share/root/include -g -c CernDict.cpp
rm -f .libs/CernDict.lo
c++ -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/event -I/usr/share/root/include -g -c CernDict.cpp -fPIC -DPIC -o .libs/CernDict.lo
c++ -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/event -I/usr/share/root/include -g -c CernDict.cpp -o CernDict.o >/dev/null 2>&1
mv -f .libs/CernDict.lo CernDict.lo
/bin/sh …/libtool --mode=link c++ -g /usr/share/root/lib/libHist.so /usr/share/root/lib/libMatrix.so /usr/share/root/lib/libTree.so /usr/share/root/lib/libCore.so /usr/share/root/lib/libCint.so -ldl -o libyodacern.la -rpath /usr/local/lib CernPamelaRun.lo CernAlgorithm.lo EventReader.lo PhysicsReader.lo CernDict.lo …/tracker/cern/libcerntracker.la …/anticoinc/cern/libcernanticoinc.la …/calorimeter/cern/libcerncalorimeter.la
rm -fr .libs/libyodacern.la .libs/libyodacern.* .libs/libyodacern.*
c++ -shared CernPamelaRun.lo CernAlgorithm.lo EventReader.lo PhysicsReader.lo CernDict.lo -Wl,–whole-archive …/tracker/cern/.libs/libcerntracker.al …/anticoinc/cern/.libs/libcernanticoinc.al …/calorimeter/cern/.libs/libcerncalorimeter.al -Wl,–no-whole-archive -ldl -Wl,-soname -Wl,libyodacern.so.0 -o .libs/libyodacern.so.0.0.0
(cd .libs && rm -f libyodacern.so.0 && ln -s libyodacern.so.0.0.0 libyodacern.so.0)
(cd .libs && rm -f libyodacern.so && ln -s libyodacern.so.0.0.0 libyodacern.so)
rm -fr .libs/libyodacern.lax
mkdir .libs/libyodacern.lax
rm -fr .libs/libyodacern.lax/libcerntracker.al
mkdir .libs/libyodacern.lax/libcerntracker.al
(cd .libs/libyodacern.lax/libcerntracker.al && ar x /home/kusanagi/yoda/cern/…/tracker/cern/.libs/libcerntracker.al)
rm -fr .libs/libyodacern.lax/libcernanticoinc.al
mkdir .libs/libyodacern.lax/libcernanticoinc.al
(cd .libs/libyodacern.lax/libcernanticoinc.al && ar x /home/kusanagi/yoda/cern/…/anticoinc/cern/.libs/libcernanticoinc.al)
rm -fr .libs/libyodacern.lax/libcerncalorimeter.al
mkdir .libs/libyodacern.lax/libcerncalorimeter.al
(cd .libs/libyodacern.lax/libcerncalorimeter.al && ar x /home/kusanagi/yoda/cern/…/calorimeter/cern/.libs/libcerncalorimeter.al)
ar cru .libs/libyodacern.a CernPamelaRun.o CernAlgorithm.o EventReader.o PhysicsReader.o CernDict.o .libs/libyodacern.lax/libcerntracker.al/TrackerPhysicsReader.lo .libs/libyodacern.lax/libcernanticoinc.al/AnticounterReader.lo .libs/libyodacern.lax/libcerncalorimeter.al/CalorimeterReader.lo
ranlib .libs/libyodacern.a
rm -fr .libs/libyodacern.lax
creating libyodacern.la
(cd .libs && rm -f libyodacern.la && ln -s …/libyodacern.la libyodacern.la)
/bin/sh …/libtool --mode=link c++ -g /usr/share/root/lib/libHist.so /usr/share/root/lib/libMatrix.so /usr/share/root/lib/libTree.so /usr/share/root/lib/libCore.so /usr/share/root/lib/libCint.so -ldl -o cernreader cernreader.o libyodacern.la …/event/libyoda.la -llog4cpp
c++ -g /usr/share/root/lib/libHist.so /usr/share/root/lib/libMatrix.so /usr/share/root/lib/libTree.so /usr/share/root/lib/libCore.so /usr/share/root/lib/libCint.so -o .libs/cernreader cernreader.o ./.libs/libyodacern.so …/event/.libs/libyoda.so -ldl /usr/local/lib/liblog4cpp.so -lnsl -Wl,–rpath -Wl,/usr/local/lib

./.libs/libyodacern.so: undefined reference to pamela::tracker::TrackerEvent::Class()' ./.libs/libyodacern.so: undefined reference totypeinfo for pamela::tracker::AdcData’
./.libs/libyodacern.so: undefined reference to ROOT::GenerateInitInstance(pamela::calorimeter::CalorimeterReader const*)' ./.libs/libyodacern.so: undefined reference topamela::anticoinc::AnticounterEvent::AnticounterEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::anticoinc::AnticounterEvent::Class()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterReader::Class()’
./.libs/libyodacern.so: undefined reference to pamela::tracker::AdcData::AdcData[in-charge](int)' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterReader::Streamer(TBuffer&)’
./.libs/libyodacern.so: undefined reference to pamela::tracker::AdcData::~AdcData [in-charge]()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterEvent::Class()’
./.libs/libyodacern.so: undefined reference to pamela::tracker::TrackerEvent::Cleanup()' ./.libs/libyodacern.so: undefined reference topamela::calorimeter::CalorimeterEvent::CalorimeterEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::calorimeter::CalorimeterEvent::Set(int, short*)' ./.libs/libyodacern.so: undefined reference tovtable for pamela::tracker::AdcData’
./.libs/libyodacern.so: undefined reference to pamela::tracker::AdcData::AddValue(int, int)' ./.libs/libyodacern.so: undefined reference topamela::tracker::TrackerEvent::TrackerEventin-charge
./.libs/libyodacern.so: undefined reference to pamela::calorimeter::CalorimeterReader::ShowMembers(TMemberInspector&, char*)' ./.libs/libyodacern.so: undefined reference topamela::tracker::AdcData::Cleanup()'
collect2: ld returned 1 exit status

some new hints?

Hi,

Please send me a full tar file to reproduce the problem.

Cheers,
Philippe

Hi,

here is the TAR of the whole program.
to compile the program just execute the ‘doit’ script. It will generate various Makefiles in the each directory under the folder you unpacked. It doesn’t write nothing outside the folder it execute (or better for now just compile).

Really thanks :slight_smile:

Cheers
maurizio
yoda.tar.gz (280 KB)

Hi,

This tar file is incomplete. The build fails requesting the file: log4cpp/Category.hh

Philippe

Hi,

the log4cpp/Category.hh is included in the log4cpp tool…i forgot to told you about that… but it’s the only requirements to make it compile.

Cheers,
Maurizio

How to I get the log4cpp tool?

Philippe

Hi,

i’ve modified the code so it doesn’t ask you for any log4cpp :slight_smile: (neither about Doxygen…)

here it come the tar…

Cheers,
maurizio
yoda.tar.gz (279 KB)

Hi,

After fixing the file PamelaRun.cpp and fixing one more makefile (to remove log4cpp), I finally reproduced your problem.

The issue is (as I expected) that you do no link against some of the implementation. In particular the failing link (cernreader) only links against the root library and the yoda library. However the pamela::tracker::TrackerEvent is only present in the libtrackerevent.la library.

Cheers,
Philippe