Re: rootcint problem

From: Paolo Calafiura (Paolo.Calafiura@cern.ch)
Date: Fri Feb 20 1998 - 02:04:26 MET


Hi Fons,
 thanks for your prompt answer
Indeed your first suggestion solved my problem
> 
>    in cases like this where the nesting of #ifdef's is too deep
> for rootcint (only one level), try excluding problematic headers
> using #ifdef __CINT__ statements. For example, assume standards.h
> gives problems, but it defines a few essential types:
> 
> ...
> ...
> #ifdef __CINT__
> typedef unsigned int u_int;
> #else
> #include <standard.h>
> #endif
> ...
> ...
and I verified, by adding the "complicated" define to the original
Event.h from the distribution, that the problem is indeed there:
#define _XOPEN4		(defined(_XOPEN_SOURCE) || \
		        ((defined(_SGI_SOURCE) && _NO_POSIX)) || \
				_ANSIMODE)


Of course I would have been happier with the selective preprocessing
> in other cases one needs to use the -p (preprocess option). Often
> this causes to much information to be provided to rootcint which
> causes it to choke up. In some case a selective preprocessing
> might be better. This can be done by the following pragma's in
> the LinkDef.h file:
> 
> #pragma preprocess X11/
> #pragma preprocess ZIP.h

but here I must not have understood what to do:
if I use -p I get a problem, as you predicted
origin:18:56:~/rootevent: rootcint -f dff.cxx -c -p -t Event.h LinkDef.h
 -t : trace execution
 CC -E -DTRUE=1 -DFALSE=0 -Dexternalref=extern -DSYSV   -I. 
-I/usr/local/root/include -I/usr/local/root/src  -D__CINT__
-I/usr/local/root/cint/include /var/tmp/aaaa000lQ.C > /var/tmp/baaa000lQ
LOADING file=TROOT.h:TROOT.h:/var/tmp/baaa000lQ
 CC -E -DTRUE=1 -DFALSE=0 -Dexternalref=extern -DSYSV   -I. 
-I/usr/local/root/include -I/usr/local/root/src  -D__CINT__
-I/usr/local/root/cint/include /var/tmp/caaa000lQ.C > /var/tmp/daaa000lQ
LOADING file=TMemberInspector.h:TMemberInspector.h:/var/tmp/daaa000lQ
 CC -E -DTRUE=1 -DFALSE=0 -Dexternalref=extern -DSYSV   -I. 
-I/usr/local/root/include -I/usr/local/root/src  -D__CINT__
-I/usr/local/root/cint/include /var/tmp/eaaa000lQ.C > /var/tmp/faaa000lQ
LOADING file=Event.h:Event.h:/var/tmp/faaa000lQ
Error: class,struct,union or type __int64_t not defined 
FILE:/usr/include/sys/types.h LINE:42
 3162:rootcint: rld: Fatal Error: attempted access to unresolvable
symbol in rootcint: Init__12G__ClassInfo

while if I set in LinkDef.h 
#pragma preprocess standards.h
#pragma preprocess rpc/
#pragma preprocess sys/
and run with or without -p I see no difference

Ciao, 
  Paolo Calafiura



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:30 MET