[vtkusers] ANSI C++ stdlib issue (windows)

Sebastien BARRE seb-ml-vtk at barre.nom.fr
Mon Oct 9 16:44:28 EDT 2000


At 16/09/00 09:06, Will Schroeder wrote:

BTW, individual VTK objects file generated with the ANSI support are much 
larger (and it takes even more time to compile the lib). My Windows 
vtkdll/obj is 266 Mb large.
The final library itself is larger.

Another issue with Microsoft Visual C++ 6.0 and the STL : I'm constantly 
experiencing the following level-2 warning (3 per files) :

d:\devel\vc-98\include\complex(203) : warning C4275: non dll-interface 
class 'std::_Complex_base<float>' used as base for dll-interface class 
'std::complex<float>'
         d:\devel\vc-98\include\complex(203) : see declaration of 
'complex<float>'
d:\devel\vc-98\include\complex(216) : warning C4275: non dll-interface 
class 'std::_Complex_base<double>' used as base for dll-interface class 
'std::complex<double>'
         d:\devel\vc-98\include\complex(216) : see declaration of 
'complex<double>'
d:\devel\vc-98\include\complex(229) : warning C4275: non dll-interface 
class 'std::_Complex_base<long double>' used as base for dll-interface 
class 'std::complex<long double>'
         d:\devel\vc-98\include\complex(229) : see declaration of 
'complex<long double>'

Warning C4275 is :
http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/c4275.htm

This time it's related to the STL provided by MSVC++.

Such problems were discussed in the newsgroup, seems to be a Microsoft flaw 
(tm)... uhh feature I mean :)
http://support.microsoft.com/support/kb/articles/Q134/9/80.asp
http://support.microsoft.com/support/kb/articles/Q168/9/58.ASP
http://support.microsoft.com/support/kb/articles/Q172/3/96.ASP

http://x51.deja.com/[ST_rn=ps]/getdoc.xp?AN=668551473
http://x67.deja.com/[ST_rn=ps]/getdoc.xp?AN=533996837
http://x66.deja.com/[ST_rn=ps]/getdoc.xp?AN=568992930

We might need to add that to vtkSystemIncludes.h :

#if defined(_WIN32) || defined(WIN32)
#if defined(_MSC_VER)
#pragma warning ( disable : 4275 )
#endif
#endif

I'm not sure if there is a way to disable a warning using a command-line 
option (which would be much more practical). And not sure if we should 
disable a warning that is not perfectly understood.

What do you think ?





More information about the vtkusers mailing list