Hi,
I've been running into a few problems with rootcint and its handling of
pre-processer flags, iostreams, and/or include file paths. I'm running
RH7.1 and gcc3.0. My root installation was updated today from cvs.
First, the cpp macros. The following will compile on my system fine when
using gcc3.0, but will fail when this file is included in other which
is parsed by rootcint:
#ifdef _CPP_BITS_IOSBASE_H // Does the compiler define an ios_base class??
[ some code omitted ]
#else // _CPP_BITS_IOSBASE_H
typedef SHOULD_NOT_SEE_ME should_not_see_me;
#endif // _CPP_BITS_IOSBASE_H
gcc works fine on this. But rootcint complains with:
Error: class,struct,union or type SHOULD_NOT_SEE_ME not defined
The typedef is just some illegal code to demonstrate that the compiler is
looking at the first block while rootcint is looking at the second. What
could cause this? Its seems to me it could lead to some very strange
behavior.
Perhaps related to the above, the following code compiles fine:
typedef ios& (*__manip_func)(ios&);
MsgStream& operator<<(__manip_func func) { [code...] }
but when this is included into a file parsed by rootcint I get:
Error: class,struct,union or type ios not defined
ios is defined in the file (on my system):
/usr/local/include/g++-v3/bits/std_iosfwd.h
as
typedef basic_ios<char> ios;
So the two problems are somehow related, I think. rootcint isn't finding
the ios_base.h header and so can't form the ios type. Just my guess. How
does rootcint decide where to get headers from? How is this kept in sync.
with the search path defined by the compiler? Anyone have an idea as to
what's going on here??
Thanks,
Mark
========================================================================
Mark Messier e-mail: messier@huhepl.harvard.edu
Harvard University http://www.hepl.harvard.edu/~messier
42 Oxford Street Tel. (617) 496-2361
Cambridge, MA 02138 Fax. (617) 495-2678
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:06 MET