[ROOT] rootcint and vector<>, list<>

From: Richard S. Holmes (rsholmes@physics.syr.edu)
Date: Thu Dec 20 2001 - 19:50:03 MET


Thanks very much for the prompt help with the vector<pair<> > problem. 
I've picked up the new version from CVS and that problem is gone.  But
now I'm seeing a somewhat similar problem.  I get errors from rootcint
if I have a data member that's a vector<> or a list<>, for some (not
all) template types.  For example, this header file:

===================
#ifndef PAN_TaFoo
#define PAN_TaFoo

#include "Rtypes.h"
#include <list>
#include <vector>

class TaFoo
{
public:
  TaFoo ();
  virtual ~TaFoo();
private:
  list<size_t> fFoo;
  vector<size_t> fBar;

  ClassDef (TaFoo, 1)
};

#endif
===================

gives these errors:

===================
rsholmes@mepserv:foo$ /cern/root/cvs/bin/rootcint -f TaDict.cc -c -p
TaFoo.hh TaLinkDef.hh
Error: class,struct,union or type unsigned int not defined 
FILE:/cern/root/cvs/cint/lib/prec_stl/list LINE:141
Error: class,struct,union or type unsigned int not defined 
FILE:/cern/root/cvs/cint/lib/prec_stl/list LINE:141
Error: class,struct,union or type unsigned int not defined 
FILE:/cern/root/cvs/cint/lib/prec_stl/vector LINE:133
Error: class,struct,union or type unsigned int not defined 
FILE:/cern/root/cvs/cint/lib/prec_stl/vector LINE:133
Warning: Error occured during reading source files
class TaFoo in TaFoo.hh line 9 original base of virtual func
Warning: Error occured during dictionary source generation
!!!Removing TaDict.cc TaDict.h !!!
/cern/root/cvs/bin/rootcint: error loading headers...
===================

TaLinkDef.hh here is

===================
#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class TaFoo+;

#endif
===================

Various other values for the template types produce different errors, or
none.
Again, I'm using Red Hat 6.2, running ROOT compiled from sources updated
today from the CVS respository.

-- 
Richard S. Holmes, Research Assistant Professor
Physics Department, Syracuse University
Syracuse, NY 13244
(315) 443-5977



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:13 MET