[Insight-users] Re: [vtkusers] about the conflict between the new IO and the old IO

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 3 00:13:23 EDT 2004


Hi Yixun,

You should simply enable the use of ANSI_STDLIB
when configuring VTK.

Chances are that you are mixing new and old
#includes for header files in your application.

Please identify a minimal piece of code where
you observer this behavior and post the code
to the list.


   Thanks


     Luis



----------------------
Yixun Liu wrote:

> Hi ITKUsers and VTKusers,
>  
>             I need use ITK+VTK, so I build them both with the 
> "use_ansi_stdlib" ON. However, one of my programs which once worked fine 
> with the VTK(the parameter "use_ansi_lib" is Off) can not work. The 
> compile error is:
>  
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ios.h(104) : error 
> C2371: 'ostream' : redefinition; different basic types
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iosfwd(257) : see 
> declaration of 'ostream'
>  
> I think the reason is that the conflict between the new IO and the old 
> IO, so I add the #undef VTK_USE_ANSI_STDLIB in my program, but the 
> compiler report the same error. If I build the VTK with the 
> "use_ansi_lib" Off and add the #define VTK_USE_ANSI_STDLIB in my 
> programm, I think, I can resolve this problem. However, I need use the 
> VTK with the ITK, if I build the VTK with 'use_ansi_lib" Off, I have to 
> build the ITK with the same configuration. I do not want to do like 
> this.  Can I have other choices to resolve the conflict between the old 
> IO and the new IO?
>  
> Thank you in advance!
>  
> Best regards,
>  
> Yixun Liu
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers






More information about the Insight-users mailing list