Re: [ROOT] compiling test code

From: Jiri Masik (Jiri.Masik@cern.ch)
Date: Thu Oct 24 2002 - 15:11:05 MEST


Mark Hodgkinson <markhod@hep.man.ac.uk> writes:

> I go into the test dircetory of root and type make Event. I get told:
> 
> gcc -O -Wall -fPIC -D_REENTRANT -I/usr/local/root/include -c Event.cxx
> In file included from /usr/local/root/include/Rtypes.h:30,
>                  from /usr/local/root/include/TObject.h:31,
>                  from /usr/local/root/include/TNamed.h:26,
>                  from /usr/local/root/include/TRandom.h:26,
>                  from Event.cxx:70:
> /usr/local/root/include/Rtypeinfo.h:32:20: typeinfo: No such file or 
> directory
[....]
> The only modification I made to the makefile was changing g++ to gcc. Do I 
> need something else for this to compile?
> 
> This is using root 30309.

Hi Mark,

why have you changed g++ to gcc? When invoked as gcc the compiler
handles the input as a C code not a C++ code. It cannot find C++
headers (typeinfo) in this case. (Newer versions of gcc detect the
language and set proper defaults for include paths and linking.)

cheers
-- 
	Jiri



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:15 MET