[vtkusers] Re: ambiguous symbol VC++ 6.0 // <iostream> vs <iostream.h>

Nigel Nunn nNunn at ausport.gov.au
Tue Jul 17 02:46:50 EDT 2001


Hi bjqin at SJTU in China! 
Many projects still depend on the older "iostreams". 
But most new projects expect the "std::iostreams". 
Trying to keep both groups happy, Visual Studio 
supports both.  To understand how to use the std:: 
versions in Vtk, see file "vtkSystemIncludes.h" 
I think the prebuilt libs are built for the older 
"iostreams", so if you want to use <iostream> instead 
of <iostream.h>, you will need to build Vtk, using the
compiler flag, 

   "VTK_USE_ANSI_STDLIB"

as well as allowing extra memory for the compiler: 
good fortune! 
Nigel 
  
>From file "vtkSystemIncludes.h" ... 

// .NAME vtkSystemIncludes - transition VTK to ANSI C++, 
//   centralize inclusion of system files
// .SECTION Description
// The vtkSystemIncludes centralizes the inclusion of system 
// include files. (This is particularly important as VTK moves 
// towards ANSI C++.)  For example, this include file enables 
// user's to build VTK with STL (i.e., use std::ostream and 
// other standard ANSI C++ functionality). 
// A compile-time flag (VTK_USE_ANSI_STDLIB) must be set 
// to enable ANSI C++ compliance. You'll probably also need 
// to set various compiler flags.  For example, on WIndows 
// for ANSI C++, use  /D "VTK_USE_ANSI_STDLIB" /GX /Zm1000 . 
 
#ifndef __vtkSystemIncludes_h 
#define __vtkSystemIncludes_h 
 
/* first include the local configuration for this machine */ 
#include <vtk/vtkConfigure.h> 
... 
... 




More information about the vtkusers mailing list