Re:

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Dec 07 1999 - 19:00:53 MET


Hi Anthony,
My guess is that you forgot to link with libPhysics.so.
This library is not linked by default with the Root executable
and it contains TLorentzVector.

Rene Brun

Anthony Faust wrote:
> 
> Good morning,
> 
>         I have a compiled class that includes an inline function as follows,
> 
> 
> #ifndef TXrayHit_hh
> #define TXrayHit_hh 1
> 
> #include "TObject.h"
> #include "TLorentzVector.h"
> 
> class TXrayHit : public TObject {
> public:
>             TXrayHit();
>    virtual ~TXrayHit();
> 
> public:
> 
>    inline TLorentzVector GetP() const;
> 
> private:
> 
>    Float_t      fPx;           // momentum
>    Float_t      fPy;           // momentum
>    Float_t      fPz;           // momentum
>    Float_t      fE;            // energy
> 
>    ClassDef(TXrayHit,1)  //A detector hit
> };
> 
> inline TLorentzVector TXrayHit::GetP() const
> {
>      TLorentzVector p(0.,0.,0.,0.);
>      p.SetPxPyPzE(fPx, fPy, fPz, fE);
>      return p;
> }
> 
> #endif
> 
>         The shared library builds correctly and loads fine and seems to show the
> function is known to root,
> 
> root [3] .class TXrayHit
> .
> .
> (compiled)        0:0    0 public: TLorentzVector GetP(void) const;
> .
> .
> 
> but when I try to access this function in my analysis macro, I get the following
> error,
> 
> ld.so.1: /export/home/afaust/bin/root/bin/root.exe: fatal: relocation error:
> file /home/afaust/xray/sim/root/../g4/Xray/root/libEvent.so: symbol
> __0oOTLorentzVectorctdNDB: referenced symbol not found
> 
> Any suggestions?
> 
> I am using Sun/Solaris 5.6 for SPARC with CC compiler, ROOT version 2.23/09
> 
> Thanks.
> 
> _____________
> Dr. Anthony A. Faust                            | Anthony.Faust@dres.dnd.ca
> Defence Research Establishment Suffield         | PH:  (403) 544-5362
> Box 4000, Medicine Hat, Alberta, CANADA T1A 8K6 | FAX: (403) 544-4704



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:44 MET