RE: [ROOT] ROOTCINT , gcc3.2 and fstream

From: Al-Turany Dr. Mohammad (M.Al-Turany@gsi.de)
Date: Wed Jan 29 2003 - 09:28:36 MET


Hi Rene,

actually it is ROOT who is using <iostream.h> and not me, and the file
fstream.h is part of the ROOT distribution, it is in the
$ROOTSYS/CINT/INCLUDE directory, any way, using <something.h> with gcc 3.2
will only give a deprecated warning but not an error. The error that I have
to deal with is that you defined fstream and fstream.h in CINT but
internally you use iostream, and when in any program fstream is explicitly
used the gcc will find it in the system and will use it, but the CINT will
look first in his include directory and use his own fstream which is not
really the fstream but the iostream. 


regards,

Mohammad

-----Original Message-----
From: Rene Brun [mailto:Rene.Brun@cern.ch]
Sent: Wednesday, January 29, 2003 8:54 AM
To: Al-Turany Dr. Mohammad
Cc: 'roottalk@pcroot.cern.ch'
Subject: Re: [ROOT] ROOTCINT , gcc3.2 and fstream


hi Mohammad,

With gcc3.2, you should use <iostream>, not <iostream.h>.
In Root, we have added an include "R__iostream.h". If you use this include,
your code will work on all systems.

Rene Brun

"Al-Turany Dr. Mohammad" wrote:
> 
> Hi Rene,
> I am facing a small problem when I try to recompile some packages at the
GSI
> with the gcc3.2, in fact these programs works with ROOT >= 3.03/9 and gcc
> 2.x but when I tried to recompile them with the gcc3.2 the ROOTYCINT was
> breaking with the error not defined type for "fstream" as he tried to
> generate the dictionary.
> 
> Then looking inside the fstrem.h in $ROOTSYS/CINT/INCLUDE I found the
> following:
> 
> /*********************************************************************
> * fstream.h
> *
> *********************************************************************/
> #ifndef G__FSTREAM_H
> #define G__FSTREAM_H
> 
> #include <iostream.h>
> 
> #endif
> 
> Is there a reason to include "iostream.h" instead of "fstream.h" in this
> file? because as I added  "#include <fstream.h>" to this file every thing
> was working normally!
> did I miss anything? is there any other solution for this problem? thanks.
> 
> regards,
> 
> Mohammad
> 
> ##################################################
> Dr. Mohammad Al-Turany
> Experiment Data Processing (DV & EE)
> Gesellschaft für Schwerionenforschung (GSI)
> Planckstr. 1
> D-64291 Darmstadt, Germany
> Tel: +49-6159-71-2554
> Fax: +49-6159-71-2986
> http://www-linux.gsi.de/~turany
> ##################################################



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET