[vtkusers] porting to windows

Louis Desjardins lost_bits1110 at hotmail.com
Mon May 1 02:01:56 EDT 2006


Hi Paul,

Thanks so much for your reply,

So I had already tried it with and wtihout "using namespace std;"

With it, I go from 22 errors to 72 errors , including the errors I had 
previously that I posted. The additional errors all look something like 
this:

error C2872: 'cout' : ambiguous symbol
error C2872: 'cin' : ambiguous symbol
error C2872: 'ofstream' : ambiguous symbol

:s




>From: "Paul Tait - OPES" <Paul at opes.com.au>
>To: "'Louis Desjardins'" <lost_bits1110 at hotmail.com>
>Subject: RE: [vtkusers] porting to windows
>Date: Mon, 1 May 2006 13:20:43 +0800
>
>Just to make sure that my vtkConfigure.h is correct I always include
>
>#ifndef VTK_USE_ANSI_STDLIB
>#error "Use new iostreams and STL"
>#endif
>
>In my main VTK source file so I know my library is as I "think" it is
>
>Looks like you've got some multiple include of iostreams file somewhere.
>Maybe in a header file
>
>Dumd question but have you got a
>
>using namespace std;
>
>Somewhere
>
>Paul
>
>-----Original Message-----
>From: vtkusers-bounces+paul=opes.com.au at vtk.org
>[mailto:vtkusers-bounces+paul=opes.com.au at vtk.org] On Behalf Of Louis
>Desjardins
>Sent: Monday, 1 May 2006 12:10 PM
>To: vtkusers at vtk.org
>Subject: [vtkusers] porting to windows
>
>
>Hi vtkusers...
>
>boy am I having a heck of a time porting my application from linux to
>windows.. :( :(
>
>I am using VC++ 6.0 on windows.
>
>When I bulit the vtk library using CMake, I set the flag
>"VTK_USE_ANSI_STDLIB"  to true, because I need to have <iostream> and
><fstream> and <sstream> etc declared without the '.h'
>
>However... now I get the following 22 errors when I compile just one of my
>many classes! (copied and pasted to the end of this email)
>
>The vtk errors point to the vtkIOStream class wherever they  have
>declarations like "using std::bla"
>
>Has someone run into this problem before????? I feel like I have tried
>everything!! (god I hate porting!)
>
>Any help is really appreciated!!
>
>Thanks!
>
>
>
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(51) : error
>C2039: 'seekdir' : is not a member of 'ios'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ios.h(106) :
>see declaration of 'ios'
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(51) : error
>C2061: syntax error : identifier 'seekdir'
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(54) : error
>C2039: 'openmode' : is not a member of 'ios'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ios.h(106) :
>see declaration of 'ios'
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(54) : error
>C2061: syntax error : identifier 'openmode'
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(91) : error
>C2629: unexpected 'class std::ostrstream ('
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(91) : error
>C2238: unexpected token(s) preceding ';'
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(109) : 
>error
>
>C2629: unexpected 'class std::strstream ('
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\strstream(109) : 
>error
>
>C2238: unexpected token(s) preceding ';'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(43) : error C2874:
>using-declaration causes a multiple declaration of 'cerr'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iostream(19) 
>:
>
>see declaration of 'cerr'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(44) : error C2874:
>using-declaration causes a multiple declaration of 'cout'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iostream(18) 
>:
>
>see declaration of 'cout'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(45) : error C2874:
>using-declaration causes a multiple declaration of 'cin'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iostream(17) 
>:
>
>see declaration of 'cin'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(46) : error C2874:
>using-declaration causes a multiple declaration of 'ios'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iosfwd(254) 
>:
>see declaration of 'ios'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(49) : 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:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(50) : 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:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(51) : error C2874:
>using-declaration causes a multiple declaration of 'ostrstream'
>         C:\Program Files\Microsoft Visual 
>Studio\VC98\INCLUDE\strstream(87)
>: see declaration of 'ostrstream'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(52) : error C2874:
>using-declaration causes a multiple declaration of 'istrstream'
>         C:\Program Files\Microsoft Visual 
>Studio\VC98\INCLUDE\strstream(68)
>: see declaration of 'istrstream'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(53) : error C2874:
>using-declaration causes a multiple declaration of 'strstream'
>         C:\Program Files\Microsoft Visual 
>Studio\VC98\INCLUDE\strstream(105)
>
>: see declaration of 'strstream'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(54) : error C2874:
>using-declaration causes a multiple declaration of 'ofstream'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iosfwd(269) 
>:
>see declaration of 'ofstream'
>C:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(55) : 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:\PROGRAM FILES\VTK\VTK\COMMON\vtkIOStream.h(56) : error C2874:
>using-declaration causes a multiple declaration of 'fstream'
>         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iosfwd(270) 
>:
>see declaration of 'fstream'
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today - it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>--
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.385 / Virus Database: 268.5.1/327 - Release Date: 28/04/2006
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Free Edition.
>Version: 7.1.385 / Virus Database: 268.5.1/327 - Release Date: 28/04/2006
>
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list