Mykulyak Andriy <A.Mykulyak@gsi.de> writes: > Hello, > > I wonder, why I cannot use consts as static class members. > > class TAFextPropHit : public TObject { > public: > static const Int_t kSignalCount = 8; > static const Float_t kScaleFactor = 1.5; > > TAFextPropHit(); > virtual ~TAFextPropHit(); > ... > > ClassDef(TAFextPropHit, 1) > ... > }; > > The class above will compile, but the shareable library built out of it will > not load into the ROOT runtime. > Hi, I think the initialization of a static data member should happen outside of the class definition class TAFextPropHit { public: static const Int_t kSignalCount; }; const Int_t TAFextPropHit::kSignalCount=8; What kind of error do you get? cheers Jiri
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET