Re: Dictionary Generation

Fons Rademakers (Fons.Rademakers@cern.ch)
Thu, 15 May 1997 18:33:15 +0200


Hi Otto,

you've hit a "feature". rootcint does not include the include
file for TH1F (TH1.h) in the generated code, which causes the
compile error. To work around this, change:

class TH1F;
to
#include "TH1.h"

I'll try to fix this problem in rootcint (but it will be
difficult for classes that do not have their own header like
TH1F).

Cheers, Fons.

Otto Schaile wrote:
>
> Dear roots,
> what is wrong with the following header file:
>
> #include "TObject.h"
> class TH1F;
> class XX : public TObject {
> private:
> TH1F *h1;
> public:
> XX();
> XX( char*);
> ~XX();
> void Draw();
> ClassDef(XX,1)
> };
>
> I get the following from rootcint and c++ (on Linux):
>
> schaileo@bizet> rootcint XXdict.C -c XX.h
> Note: operator new() masked c
> Note: operator delete() masked c
>
> schaileo@bizet> c++ -c -I$ROOTSYS/include XXdict.C
> XXdict.C: In method `void XX::Streamer(class TBuffer &)':
> XXdict.C:382: no match for `operator >>(class TBuffer, class TH1F *)'
>
> cheers,
>
> ----------------------------------------------------------------------------
> Otto Schaile Sektion Physik der LMU Muenchen
> Phone: (+49 89)289 14070 Am Coulombwall 1, D-85748 Garching, Germany
> FAX: (+49 89)289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910