RE: [ROOT] Compile errors using root 3.05/3 with VC++

From: Faine, Valeri (fine@bnl.gov)
Date: Wed Mar 12 2003 - 19:27:56 MET


He Ed,
Can you check whether you have any  <iostream> include files in your
code?
That should be replaced with #include "Riostream.h" from the
$ROOTSYS/include 

   Hope this helps, 
                       Valeri


> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]
> On Behalf Of Ed Oltman
> Sent: Wednesday, March 12, 2003 1:01 PM
> To: Roottalk@Pcroot. Cern. Ch
> Subject: [ROOT] Compile errors using root 3.05/3 with VC++
> 
> Hello,
> 
> 
> I have code that uses #include <fstream.h> that compiled and ran fine
with
> version 3.03/9 and 3.05/2 but produced compile errors with 3.05/3
under
> visual c++ version 6 (win2K):
> 
> c:\root\include\riosfwd.h(25) : error C2874: using-declaration causes
a
> multiple declaration of 'istream'
>         c:\program files\microsoft visual
studio\vc98\include\iosfwd(256)
> :
> see declaration of 'istream'
> c:\root\include\riosfwd.h(26) : error C2874: using-declaration causes
a
> multiple declaration of 'ostream'
>         c:\program files\microsoft visual
studio\vc98\include\iosfwd(257)
> :
> see declaration of 'ostream'
> c:\root\include\riosfwd.h(27) : error C2874: using-declaration causes
a
> multiple declaration of 'fstream'
>         c:\program files\microsoft visual
studio\vc98\include\iosfwd(270)
> :
> see declaration of 'fstream'
> c:\root\include\riosfwd.h(28) : error C2874: using-declaration causes
a
> multiple declaration of 'ifstream'
>         c:\program files\microsoft visual
studio\vc98\include\iosfwd(268)
> :
> see declaration of 'ifstream'
> c:\root\include\riosfwd.h(29) : error C2874: using-declaration causes
a
> multiple declaration of 'ofstream'
>         c:\program files\microsoft visual
studio\vc98\include\iosfwd(269)
> :
> see declaration of 'ofstream'
> 
> The include section of the file is:
> 
> #pragma warning (disable : 4800)
> #include <fstream.h>
> #include <stdlib.h>
> 
> // ROOT includes
> #include "TString.h"
> #include "TSystem.h"
> 
> //project include files
> #include "CIniFile.h"
> 
> and CIniFile.h does not have any included.  Any idea of a solution?
> Thanks,
> 
> Ed Oltman



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