When rootcint encounters a data member that is a pointer to a fundamental type, it prints a Warning message calling for manual intervention, because rootcint has no way to know the length of the array corresponding to the pointer. This is explained in http://root.cern.ch/root/HowtoWrite.html see also the course 3 of Root at ftp://root.cern.ch/root/course3.ps.gz In your example, you have two possibilities: A- Recommended Replace you data members Text_t * by TString objects and Streamer will be automatic. Text_t *l_DocumentClass; // Latex cmd documentclass Text_t *l_UsePackage; // Latex cmd usepackages by TString l_DocumentClass; // Latex cmd documentclass TString l_UsePackage; // Latex cmd usepackages B- using your class header unmodified You must modify the Streamer function adding statements like: in Read part Int_t l; R__b >> l; // read string length R__b.ReadFastArray(l_DocumentClass,l); //read array in write part Int_t l = strlen(l_DocumentClass) +1; R__b.WriteFastArray(l_DocumentClass,l); In the second case, you should copy the Streamer function in the implementation of your class and modify your LinkDef.h file by adding the symbol "-" in front of the class name to prevent rootcint to generate the Streamer function itself. Rene Brun mayer@ik1.fzk.de wrote: > > Hello! > > Whats wrong with the following declaration of pointers > l_DocumentClass and l_UsePackage? When trying to link a shared library, > rootcint complains, and the library cant be loaded by root. > Thanks in Advance. Hajo! > > This is rootcint output: > ------------------------ > [hajo@halimash cxx]$ make > Generating dictionary ... > *** Datamember LAVaDocumentAtt::l_DocumentClass: pointer to fundamental type > (need manual intervention) > *** Datamember LAVaDocumentAtt::l_UsePackage: pointer to fundamental type > (need manual intervention) > g++ -O -Wall -fPIC -I/cern/root/2.0b3/root/include -c lavaCint.cxx > > THis is the header definition > ----------------------------- > #include "TNamed.h" > > class LAVaDocumentAtt : public TNamed { > > private: > > Text_t *l_DocumentClass; // Latex cmd documentclass > Text_t *l_UsePackage; // Latex cmd usepackages > > public: > > LAVaDocumentAtt(); > LAVaDocumentAtt(const char *name, const char *title); > ~LAVaDocumentAtt(); > void SetDocumentClass(Text_t *options, Text_t *style); > void SetUsePackage(Text_t *options, Text_t *packages); > void Print(); > Text_t *GetDocumentClass() {return l_DocumentClass;} > Text_t *GetUsePackages() {return l_UsePackage;} > > ClassDef(LAVaDocumentAtt,1) // Latex document Attributes > }; > #endif //________________________________________________________________________
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:33 MET