RE: compile problem

From: Philippe Canal <>
Date: Fri, 21 Jan 2005 10:58:39 -0600

The proper rootcint command line is:

-----Original Message-----
From: [] On Behalf Of Pietro Govoni
Sent: Friday, January 21, 2005 8:32 AM
To: root mailing list
Subject: [ROOT] compile problem

Dear ROOTers,

I would like to compile a program including a user-defined class inheriting from TObject.

The class is CalibObj.cxx:

#ifndef CALBOBJ_H
#define CALBOBJ_H
#include "TObject.h"

    class CalibObj: public TObject
      float electronSCEnocorr_ ; //not corrrcted


      CalibObj () {} 
      virtual ~CalibObj () {} 

      ClassDef (CalibObj,1) ;

    } ;


#if !defined(__CINT__)

    ClassImp (CalibObj) ;

I created the dictory by:
rootcint -f CalibObjDict.cxx CalibObj.cxx LinkDef.h

with the LinkDef.h:

   #ifdef __CINT__ 
   #pragma link C++ class CalibObj-!;

The main program is salvo.cpp:

#include <iostream>
#include "TFile.h"
#include "CalibObj.cxx"

    int main ()

      TFile db ("prova.root","RECREATE") ;
      db.Close () ;


I am trying to compile it by means of the command:

c++ `root-config --cflags --libs --glibs` CalibObj.cxx CalibObjDict.cxx salvo.cpp -o salvo

and I get the error:

In file included from CalibObjDict.cxx:26: /local/root/include/RtypesImp.h:16:2: #error RtypesImp.h should only be included by ROOT dictionaries.

Could you explain me, please, what I am missing? (please, find the files also in attachment)

The root I am using is:

Thank you very much, kind regards

Pietro Received on Fri Jan 21 2005 - 18:13:19 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET