Hi ROOTers, I have some problems. I wrote a simple class: #include <iostream.h> #include "TObject.h" #include "secondaclasse.h" ClassImp(secondaclasse); // Seconda classe class secondaclasse : public TObject { private: int x,y; public: secondaclasse(); void setx(int xx); void sety(int yy); void print(); }; secondaclasse::secondaclasse() { x=0; y=0; } void secondaclasse::setx(int xx) { x=xx; } void secondaclasse::sety(int yy) { y=yy; } void secondaclasse::print() { cout<<"\nX= "<<x<<"\tY= "<<y<<endl; } and the class header is #include <iostream.h> #include "TObject.h" class secondaclasse : public TObject { private: int x,y; public: secondaclasse(); void setx(int xx); void sety(int yy); void print(); ClassDef(secondaclasse,1); }; When I write rootcint dict.cxx -c secondaclasse.h LinkDef.h I get: Class secondaclasse: Streamer() not declared Class secondaclasse: ShowMembers() not declared Why? My LinkDef.h is #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class secondaclasse+; #endif After, I write: g++ -fPIC -I $ROOTSYS/include dict.cxx and I get several errors, for example dict.cxx: In function `int G__secondaclasse_ClassDef_4_0 (G__value *, const char *, G__param *, int)': dict.cxx:104: parse error before `private' dict.cxx:104: cannot declare static function inside another function dict.cxx:104: cannot declare static function inside another function dict.cxx:104: parse error before `{' dict.cxx:104: warning: no return statement in function returning non-void ........... Why? Thank you for your help. Giuseppe. My system is Linux Red Hat 7.1 ROOT version is : ROOT 3.02/07
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:01 MET