Hi Paolo, this is what I am doing when processing some X11 and Motif headers. Below is file CintPrep.h that I use in that case: //-- CintPrep.h #ifdef __CINT__ #pragma preprocess Xm/ #pragma preprocess X11/ #endif now I call rootcint like this: rootcint -f dict.cxx -c CintPrep.h TGX11.h LinkDef.h TGX11.h contains a class TGX11 (exported in LinkDef.h) and it includes some <X11/...> include files. So my previous message was wrong when I stated that I used the preprocess pragma's in LinkDef.h. The preprocess pragma's should, obviously, be given before rootcint processes TGX11.h. Sorry for the mistake. Cheers, Fons. Paolo Calafiura wrote: > > Fons, > I am sorry but my previous message was totally obscure. Let me see if I > can make myself clear (sorry roottalkers for all this noise) > I had a problem with rootcint understanding a complex (implicit) > ifdef. One way out you suggested is to let the standard pre-processor > handle this construct using -p to switch on pre-processing of all header > files or better using "#pragma preprocess" to switch on selective > pre-processing of the problematic header file. > > If I use -p with or without #pragma preprocess I see that ALL .h are > pre-processed by cc and that, as you expected, rootcint gets confused by > all this stuff and fails in an header file (Event.h) that it previously > handled fine. > > If I don't use -p but I try to switch on the selective pre-processing > adding a #pragma for the particular header file that contains the > complex ifdef, I don't see that CC is used to preprocess it and, of > course, the rootcint error is back. > > So my question is: to switch on selective preprocessing do I need only > to add the #pragma (apparently this is not the case) or should I do > something in addition? > > Fons Rademakers wrote: > > > > Hi Paolo, > > > > there is no difference between the rootcint -p option > > or the LinkDef.h #pragma preprocess option. If a header > > causes problems with -p it will also cause problems with > > #pragma preprocess. The #pragma should be used to selectively > > preprocess headers that don't cause problems, but for which > > the preprocessed info is important for rootcint. I use this > > pragma to preprocess some X11 and Xm headers. > > -- 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
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:30 MET