RE: [ROOT] Inheriting from base class made from MakeSelector

From: Philippe Canal (pcanal@fnal.gov)
Date: Fri Jul 18 2003 - 19:23:26 MEST


Hi Thomas,

You may have 'forgot' to _first_ compile and load AnaBase?
Also you should make sure that any member function actually listed in the .h
is implemented (either in the .h or the .C).

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Thomas Schoerner
Sent: Friday, July 18, 2003 12:00 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Inheriting from base class made from MakeSelector


Hi,

I created a base class AnaBase using MakeSelector and am try to inherit
from it into a class AnaJet. I include the .h and .C files in the
attachment. The error message is below. Does anybody know what I am doing
wrong? I tried both commenting and not commenting the general methods that
are not implemented in AnaJet
(Init,Notify,SetOption,SetObject,SetInputList,GetOutputList).

Cheers, and thanks,

Thomas

nfo in <TUnixSystem::ACLiC>: creating shared library
/data/zenith209b/schorner/root/./AnaJet_C.so
In file included from /data/zenith209b/schorner/root/filePHFvWs.h:29,
                 from /data/zenith209b/schorner/root/./filePHFvWs.cxx:13:
/data/zenith209b/schorner/root/AnaJet.C: In method `Bool_t
AnaJet::ProcessCut(int)':
/data/zenith209b/schorner/root/AnaJet.C:227: warning: unused variable
`Int_t iCounter'
/data/zenith209b/schorner/root/AnaJet.C:226: warning: unused variable
`class TLorentzVector * iterator_Object'
dlopen error: /data/zenith209b/schorner/root/./AnaJet_C.so: undefined
symbol: Notify__6AnaJet
Load Error: Failed to load Dynamic link library
/data/zenith209b/schorner/root/./AnaJet_C.so
In file included from /data/zenith209b/schorner/root/filePHFvWs.h:29,
                 from /data/zenith209b/schorner/root/./filePHFvWs.cxx:13:
/data/zenith209b/schorner/root/AnaJet.C: In method `Bool_t
AnaJet::ProcessCut(int)':
/data/zenith209b/schorner/root/AnaJet.C:227: warning: unused variable
`Int_t iCounter'
/data/zenith209b/schorner/root/AnaJet.C:226: warning: unused variable
`class TLorentzVector * iterator_Object'
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
/data/zenith209b/schorner/root/./filePHFvWs.o: In function
`AnaJet::ShowMembers(TMemberInspector &, char *)':
/data/zenith209b/schorner/root/./filePHFvWs.o(.text+0xc373): undefined
reference to `AnaBase::ShowMembers(TMemberInspector &, char *)'
/data/zenith209b/schorner/root/./filePHFvWs.o(.gnu.linkonce.d.__vt_6AnaJet+0
x94):
undefined reference to `AnaJet::Notify(void)'
/data/zenith209b/schorner/root/./filePHFvWs.o(.gnu.linkonce.d.__vt_6AnaJet+0
xe4):
undefined reference to `AnaJet::Init(TTree *)'
/data/zenith209b/schorner/root/./filePHFvWs.o: In function `AnaJet
type_info function':
/data/zenith209b/schorner/root/./filePHFvWs.o(.gnu.linkonce.t.__tf6AnaJet+0x
22):
undefined reference to `AnaBase type_info function'
/data/zenith209b/schorner/root/./filePHFvWs.o(.gnu.linkonce.t.__tf6AnaJet+0x
2d):
undefined reference to `AnaBase type_info node'
/data/zenith209b/schorner/root/./filePHFvWs.o: In function
`AnaJet::AnaJet(AnaJet const &)':
/data/zenith209b/schorner/root/./filePHFvWs.o(.AnaJet::gnu.linkonce.t.(AnaJe
t
const &)+0x292): undefined reference to `AnaBase::~AnaBase(void)'
/data/zenith209b/schorner/root/./filePHFvWs.o: In function
`AnaJet::AnaJet(TTree *)':
/data/zenith209b/schorner/root/./filePHFvWs.o(.AnaJet::gnu.linkonce.t.(TTree
*)+0x24): undefined reference to `AnaBase::AnaBase(TTree *)'
/data/zenith209b/schorner/root/./filePHFvWs.o(.AnaJet::gnu.linkonce.t.(TTree
*)+0x58): undefined reference to `AnaBase::~AnaBase(void)'
/data/zenith209b/schorner/root/./filePHFvWs.o: In function
`AnaJet::~AnaJet(void)':
/data/zenith209b/schorner/root/./filePHFvWs.o(.gnu.linkonce.t._._6AnaJet+0x3
0):
undefined reference to `AnaBase::~AnaBase(void)'
/data/zenith209b/schorner/root/./filePHFvWs.o: In function
`AnaBase::AnaBase(AnaBase const &)':
/data/zenith209b/schorner/root/./filePHFvWs.o(.AnaBase::gnu.linkonce.t.(AnaB
ase
const &)+0x2d): undefined reference to `AnaBase virtual table'
collect2: ld returned 1 exit status
*** Interpreter error recovered ***
Error in <TSelector::GetSelector>: file AnaJet.C+ does not have a valid
class deriving from TSelector



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET