The proper rootcint command line is:
rootcint -f CalibObjDict.cxx -c CalibObj.cxx LinkDef.h
Cheers,
Philippe.
-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
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
{
public:
float electronSCEnocorr_ ; //not corrrcted
public:
CalibObj () {} virtual ~CalibObj () {} ClassDef (CalibObj,1) ;
#endif
#if !defined(__CINT__)
ClassImp (CalibObj) ;
#endif
I created the dictory by:
rootcint -f CalibObjDict.cxx CalibObj.cxx LinkDef.h
with the LinkDef.h:
#ifdef __CINT__ #pragma link C++ class CalibObj-!; #endif
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:00:58 MET
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET