[vtkusers] Re: Win2000, VC++, different calling convention

Nigel Nunn nNunn at ausport.gov.au
Fri Jun 30 19:00:52 EDT 2000


First thing is to make sure that both the Vtk libs and 
your .exe application are linking with the same CRT 
(C RunTime) library -- 
 
Under Project Settings;  C/C++ ; Code Generation 
in the field "Use run-time library:", choose 

   [Debug] Multithreaded DLL 
 
More importantly, Vtk still defaults to compiling and linking 
with the old iostreams library.  If your application is using 
the Std C++ library, you will be mixing old and new versions, 
e.g., 
 
 std::iostream from <iostream> from MFC app. 
 iostream from <iostream.h> from vtk libs. 
 
If this is the case, then either rebuild the app with the 
old iostreams library, or rebuild the vtk libs with the flag, 
 
  VTK_USE_ANSI_STDLIB 
 
If you choose to rebuild Vtk with ANSI C++ iostreams and 
exception handling, then you will also need to adjust the 
VC project's compiler options:  add the option [somewhere] 
 
  Zm1000 
 
to request 10 times normal more compiler memory.  The 
following comes from earlier advice from Kitware folks: 
 
 
> If you'd like to compile with ANSI C++, compile [Vtk] with 
> 
>   VTK_USE_ANSI_STDLIB 
> 
> and set the compiler flags appropriate to your compiler. 
> For example, in MS Visual C++, I'm setting the advanced 
> flags in pcmaker to: 
> 
>    /D "VTK_USE_ANSI_STDLIB" /GX /Zm1000 
> 
>    /GX turns on exception handling, 
>    Zm1000 requests 10x more compiler memory...
> 





More information about the vtkusers mailing list