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

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Feb 10 2003 - 12:48:43 MET


This change is only in CVS.

Rene Brun

"Al-Turany Dr. Mohammad" wrote:
> 
> Hi Rene,
> 
> Thanks, is this change already in the release or only in CVS?
> 
> regards
> 
> Mohammad
> 
> -----Original Message-----
> From: Rene Brun [mailto:Rene.Brun@cern.ch]
> Sent: Monday, February 10, 2003 9:50 AM
> To: Al-Turany Dr. Mohammad
> Cc: Roottalk (E-mail)
> Subject: Re: [ROOT] ROOTCINT , gcc3.2 and fstream
> 
> Hi Mohammad,
> 
> see last item in CINT Release Notes at:
> http://root.cern.ch/root/Cint.html
> http://root.cern.ch/root/Cint.phtml?relnote
> 
> Rene Brun
> 
> "Al-Turany Dr. Mohammad" wrote:
> >
> > Hi Rene,
> >
> > I tried "fstream.h" and <fstream> it did not work at all! I am using
> gcc3.2
> > with ROOT 3.03-9, 3.04.1 and 3.05-0 and it is not working on any of these
> > versions!
> >
> > I tried to look into the gcc3strm.h and it seams to me that the fstream is
> > not defined or implemented at all for this compiler, the same is true for
> > the icc (iccstrm.h) but it is defined for example in the bcstrm.h and
> > kccstrm.h! could this be the reason?
> >
> > regards
> >
> > Mohammad
> >
> > -----Original Message-----
> > From: Rene Brun [mailto:Rene.Brun@cern.ch]
> > Sent: Monday, February 03, 2003 9:07 AM
> > To: Al-Turany Dr. Mohammad
> > Cc: Roottalk (E-mail)
> > Subject: Re: [ROOT] ROOTCINT , gcc3.2 and fstream
> >
> > Hi Mohammad,
> >
> > both fstream and fstream.h are in $ROOTSYS/cint/include.
> > Which version are you using?
> >
> > If you are working with gcc3.2, you should #include <fstream>
> >
> > Rene Brun
> >
> > "Al-Turany Dr. Mohammad" wrote:
> > >
> > > Hi Rene,
> > >
> > > Is it possible to include the system fstream in the
> > > $ROOTSYS/cint/include/fstream.h? Is there any reason not to use fstream
> > with
> > > ROOTCINT?
> > >
> > > Best regards
> > >
> > > Mohammad
> > >
> > > -----Original Message-----
> > > From: Al-Turany Dr. Mohammad [mailto:M.Al-Turany@gsi.de]
> > > Sent: Wednesday, January 29, 2003 9:29 AM
> > > To: 'roottalk@pcroot.cern.ch'
> > > Subject: RE: [ROOT] ROOTCINT , gcc3.2 and fstream
> > >
> > > 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:09 MET