Hello Rene and Rutger, The #preprocessor [on/off] statement is already there for quite some time. Please refer to $CINTSYSDIR/doc/ref.txt and search for '#pragma preprocessor'. With this command, include files enclosed between the preprocessor on and off are handled by external preprocessor. Please verify if this works for you. Thank you Masaharu Goto >Date: Mon, 11 Dec 2000 07:19:31 +0000 >From: Rene Brun <Rene.Brun@cern.ch> >To: rootdev@pcroot.cern.ch >Subject: [Fwd: [ROOT] CINT parsing suggestion... +P option etc...] > >I am currently looking at some old mails that, I believe, have not yet >been processed. Philippe, could you investigate if this problem is still ther e ? > >Rene >----------------------------------------------------------------------------- - -- >Date: Tue, 12 Sep 2000 10:47:34 +0200 (MET DST) >From: Rutger van der Eijk <r36@nikhef.nl> >To: ROOT mailing list <roottalk@pcroot.cern.ch> >Subject: [ROOT] CINT parsing suggestion... +P option etc... > >Hi, > >I again have run into a problem of having to parse some none ROOT-aware >code included from my own code while generating a dictionary for that >code. CINT runs into it's macro limitations, i.e. things like: > >Limitation: macro handled as typedef std::string HepStdString; >FILE:/afs/cern.ch/sw/lhcxx/specific/@sys/egcs_1.1.2/CLHEP/1.5.0.0/include/CLH E P/config/CLHEP.h >LINE:35 >Limitation: can not handle macro HepStdVector std::vector Use +P or -p >option > >FILE:/afs/cern.ch/sw/lhcxx/specific/@sys/egcs_1.1.2/CLHEP/1.5.0.0/include/CLH E P/config/CLHEP.h >LINE:38 >Limitation: can not handle macro HepStdList std::list Use +P or -p option > >FILE:/afs/cern.ch/sw/lhcxx/specific/@sys/egcs_1.1.2/CLHEP/1.5.0.0/include/CLH E P/config/CLHEP.h >LINE:41 >Limitation: can not handle macro HepStd std Use +P or -p option > >FILE:/afs/cern.ch/sw/lhcxx/specific/@sys/egcs_1.1.2/CLHEP/1.5.0.0/include/CLH E P/config/CLHEP.h >LINE:60 >Error: G__getvariable: expression >FILE:/afs/cern.ch/sw/lhcxx/specific/@sys/egcs_1.1.2/CLHEP/1.5.0.0/include/CLH E P/config/CLHEP.h >LINE:82 >Syntax Error: template<> >FILE:/afs/cern.ch/sw/lhcxx/specific/@sys/egcs_1.1.2/CLHEP/1.5.0.0/include/CLH E P/config/CLHEP.h >LINE:82 > > >As far as I know there are 2 ways to solve this (besides from getting into >political fights): > >1) > >#ifndef __CINT__ >#include "externam include file that causes CINT problems.h" > >#else > >// put all statements from exteral include needed for CINT to parse >// (i.e. all statemenst used in following code) > >#endif // __CINT__ > >I rather not do this as there is quite some code I would have to put after >the #else > > >2) Use +P or -p option. This is an option but I do not want to use these >options for my own code. One reason is that if one (basic, i.e. >fundamental) class uses the external library I have to use the +P and -p >option for all code using (including) this basic class, i.e. I have to >use the options for all code. The latter I have never found to work upto >now, because +P -p does not always work correctly everywhere. > >I was wondering if the following is possible: > >Introduce macros: > >#preprocOn > >turning on the preprocessor option, and > >#preprocOff > >turning it off again. > >Such that the preprocessing only is applied for the code that causes >problems, i.e. > >#preprocOn >#include "externam include file that causes CINT problems.h" >#preprocOff > > >Cheers, > >Rutger > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:39 MET