[vtkusers] vtk User Code Compilation Problems

Sebastien BARRE seb-ml-vtk at barre.nom.fr
Sat Sep 16 07:39:16 EDT 2000


At 00:12 16/09/00 -0500, Kent Vander Velden a écrit:

>   Vtk 3.1 includes <iostream.h> in a few files.  This causes problems
>with code that includes <iostream> with Microsoft Visual C++ 6.0.
>The problem seems to be that cout and others are in global namespace in
><iostream.h> while they are in std namespace in <iostream>.  Code that
>has calls like "using std::cout" end up having cout (and others) multiply
>defined because the two header files have different definitions.
>
>   Could vtk be changed to use the newer <iostream> instead of <iostream.h>?
>Using <iostream> is also important for proper use of STL.

STL makes extensive use of template classes, which is a feature that is not 
extensively supported by all compilers. That's the reason why VTK does not 
use templated classes. And one of the reason it does not use the new 
iostream library I guess (although I do not remember if <iostream> is 
heavily templated or not).

Anyway, this issue has been discussed some time ago, and I do remember that 
someone posted a hack to use <iostream>, please search the mailing list 
archive. Please keep us informed, as some of us are using the STL too.




More information about the vtkusers mailing list