[vtkusers] VTK_USE_ANSI_STDLIB/compile question
Bill Vogler
vogler at calcreek.com
Tue Mar 22 18:31:16 EST 2005
I downloaded the precompile version of vtk4.2 for the Windoze platform. Our
application uses the ANSI streams (e.g. <iostream>, <fstream>, etc.).
When I initially compiled our app, I got a lot of error messages telling me
that I was "using-declaration causes a multiple declaration of 'istream'".
After doing some "grepping" and using my infinite wisdom I included
VTK_USE_ANSI_STDLIB in my "Preprocessor Definitions" in the Project Settings
of MSVC++ 6.0. I assumed that since this 2005, the precompiled versions must
have used ANSI streams (this logic will no doubt get me in trouble). Well to
make a long story short, the compile problems went away, BUT I got some
unresolved externals at the link stage. Sure enough, all the unresolved
externals were associated the ANSI streams: For example:
BoaInteractorStyle.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall vtkObjectBase::PrintTrailer(class
std::basic_ostream<char,struct std::char_traits<char> > &,class vtkIndent)"
(?PrintTrailer at vtkObjectBase@@UAEXAAV?$
basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
Did I error in including VTK_USE_ANSI_STDLIB in my "Preprocessor
Definitions"? Was the precompiled version on the vtk.org download web page
compiled with it?
TIA
Bill Vogler
Calabazas Creek Research
(530) 642-1955 Voice
(530) 642-9614 Fax
vogler at calcreek.com
More information about the vtkusers
mailing list