Hi Brett, Support for STL is only available if you specify the option "+" in your LinkDef file. Change: #pragma link C++ class PairClass; to #pragma link C++ class PairClass+; Rene Brun Brett Viren wrote: > > Hi, > > I am having problem getting rootcint to run on a class which has a > nested class and which uses pair<>. I have excerpted code which > reproduces the problem and it is appended. Also appended is the > errors from running: > > rootcint -f PairClassCint.cc -c PairClass.h PairClassLinkdef.h > > Compiling PairClass.{h,cxx} with g++ 2.95.4 (Debian GNU/Linux x86) > succeeds, so I don't think I am doing illegal C++. This is with ROOT > CVS as of today. > > Any ideas? > -Brett. > > //--- begin ROOTCINT errors ---// > bviren@minos:test> rootcint -f PairClassCint.cc -c PairClass.h PairClassLinkdef.h > Error: Symbol constSomeClass is not defined in current scope FILE:prec_stl/utility LINE:12 > Error: Symbol second is not defined in current scope FILE:prec_stl/utility LINE:12 > Warning: Unknown type 'constSomeClass' in function argument handled as int FILE:prec_stl/utility LINE:14 > Error: Symbol pair<int is not defined in current scope FILE:prec_stl/list LINE:143 > Error: Symbol constSomeClass is not defined in current scope FILE:prec_stl/list LINE:143 > Error: G__getvariable: expression FILE:prec_stl/list LINE:143 > Warning: Error occured during reading source files > Warning: Error occured during dictionary source generation > !!!Removing PairClassCint.cc PairClassCint.h !!! > rootcint: error loading headers... > //--- end ROOTCINT errors ---// > > //--- begin PairClass.h ---// > #ifndef PAIRCLASS_H > #define PAIRCLASS_H > #include "TBox.h" > #include <list> > #include <map> > > class SomeClass; > > class PairClass : public TObject > { > public: > typedef pair<int,const SomeClass*> MyPair; > > class MyPairList : public TBox { > list <MyPair> fPairList; > public: > MyPairList(); > virtual ~MyPairList(); > }; > > PairClass(); > virtual ~PairClass(); > > private: > map<int,MyPairList*> fPairListMap; > }; > #endif // PAIRCLASS_H > //--- end PairClass.h ---// > > //--- begin PairClass.cxx ---// > #include "PairClass.h" > PairClass::PairClass() {} > PairClass::~PairClass() {} > PairClass::MyPairList::MyPairList() {} > PairClass::MyPairList::~MyPairList() {} > //--- end PairClass.cxx ---// > > //--- begin PairClassLinkdef.h ---// > #ifdef __CINT__ > #pragma link off all globals; > #pragma link off all classes; > #pragma link off all functions; > #pragma link C++ class PairClass; > #endif > //--- end PairClassLinkdef.h ---//
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET