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/CLHEP/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/CLHEP/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/CLHEP/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/CLHEP/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/CLHEP/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/CLHEP/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:32 MET