// Very simple class, containing string s[7] in header file: // myClass.cc: #include "myClass.h" ClassImp(myClass) myClass::myClass() {} // Constructor myClass::~myClass() {} // Destructor // myClass.h: #include "TObject.h" class myClass : public TObject { public: myClass(); // Constructor ~myClass(); // Destructor ClassDef(myClass,1) }; // also define a myClass_LinkDef.h: #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class myClass; #endif // I compile myClass with -fPIC option: // g++ myClass.cc -c `root-config --cflags --libs` -fPIC // this gives myClass.o. // Then I create dictionary files: // rootcint -f myClass_dict.cc -c myClass.h // this gives myClass_dict.cc and myClass_dict.h // when I try to compile those too, // g++ myClass_dict.cc -c `root-config --cflags --libs` -fPIC // I get the following error: // myClass_dict.cc:119: error: request for member `c_str' in // `((myClass*)this)->myClass::s', which is of non-class type `std::string[7]' // Indeed, myClass_dict.cc generated by rootcint contains the line // { TString R__str = s.c_str(); // which is evidently not compilable!