[vtkusers] porting to windows

Louis Desjardins lost_bits1110 at hotmail.com
Mon May 1 00:09:58 EDT 2006


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/




More information about the vtkusers mailing list