It looks like you have edited THit.h, removing the implementation of the two missing functions. Rene Brun On Sat, 2 Aug 2003, zaldy wrote: > > Dear ROOTers, > > My apology if this post is too trivial. > > What is wrong with the ff. lines/codes? > I have a class which is produced by tree->MakeClass("THit"). > > I want to inherit from THit class, and I will name it as THitCR class > But when I compile it I have the errors. > > How do we correct them? > > Thanks a lot...... > > .................................... > ................................... > -o THitCR > libTHitCR.so: undefined reference to THit::THit(TTree *)' > libTHitCR.so: undefined reference to THit::~THit(void)' > > > //---------------------------------------- > #ifndef THitCR_h > #define THitCR_h > > #include <iostream> > using namespace std; > > #include "THit.hh" // prototype/defn of Base Class > > class THitCR : public THit > { > public : > > THitCR(); > ~THitCR(); > > void greet(); > > }; > > #endif > > //-------------------------------- > #define THitCR_cxx > > #include "THitCR.hh" > > > THitCR::THitCR() : THit() > {;} > > THitCR::~THitCR() > {;} > > void THitCR::greet() > { > cout << " Hello ROOTers ..." << endl; > } > > > > -------------------------------------------------------- > Zaldy A. Nawang > PS Users Room 2 > Yon Gokan, > E362, Neutrino Group, > IPNS, KEK, > Japan > > e-mail: zaldy@neutrino.kek.jp > Tel. No. : (81) 029864 - 5387 > -------------------------------------------------------- > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET