[vtkusers] vtk User Code Compilation Problems

Will Schroeder will.schroeder at kitware.com
Sat Sep 16 09:06:55 EDT 2000


Hi Kent-

VTK already has the capability. You have to compile with the compile-flag
VTK_USE_ANSI_STDLIB. You'll also want to set appropriate compiler flags.

(For example, in MS Visual C++, set the advanced flags in pcmaker to:
/D "VTK_USE_ANSI_STDLIB" /GX /Zm1000
(the /GX turns on exception handling, Zm1000 requests 10x more compiler
memory).

This is implemented in part by the file vtkSystemIncludes.h (I'm looking at the
nightly releases). There should not be any "#include <iostream.h>" or
"#include <iostream> left in any vtk files, if there are let us know about it.
vtkSystemIncludes should isolate these ANSI C++ file issues.

Will


At 12:12 AM 9/16/2000 -0500, Kent Vander Velden wrote:

>   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.
>
>   Thanks!
>
>---
>Kent Vander Velden
>kent at iastate.edu
>
>
>_______________________________________________
>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://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list