[vtk-developers] deprecated CRT routines in MSVS8

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Aug 2 11:05:26 EDT 2005


Hi Andy,

Maybe, at the CMake level swich off depreciation of the CRT functions 
(for MSVC8) by default but have an easy way at the CMakeList.txt project 
level to switch depreciation back on again if someone really wants to 
use the "security enhanced" CRT and would like the compiler to warn them 
if they accidently use the "unsecure" CRT function.

Goodwin

Andy Cedilnik wrote:

>Hi Goodwin, Yianis,
>
>Maybe we should do this on CMake level. I would say that by default C
>should not be deprecated. Then we could have a cmake variable let say
>CMAKE_SECURE_API or something that would disable this behavior.
>
>What do you think?
>
>       Andy
>
>Goodwin Lawlor wrote:
>
>  
>
>>Hi,
>>
>>You can also add to vtkWin32Header.h
>>
>>#  pragma warning ( disable : 4996 ) /* depreciated functions */
>>
>>which clears up most of the warnings (not for the Utilities)
>>
>>hth
>>
>>Goodwin
>>
>>Yianis Nikolaou wrote:
>>
>>    
>>
>>>hi,
>>>
>>>as you probably know, in MS Visual Studio 8 a bunch of CRT routines
>>>have been marked with a DEPRECATED keyword
>>>(for example strcpy, sprintf etc. see also
>>>http://msdn2.microsoft.com/library/wd3wzwts(en-us,vs.80).aspx
>>><http://msdn2.microsoft.com/library/wd3wzwts%28en-us,vs.80%29.aspx>)
>>>and the compiler generates a zillion warnings when I compile VTK
>>>
>>>Could you please add in CmakeLists.txt
>>>
>>>ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
>>>
>>>to disable these warnings by default when using the above compiler?
>>>
>>>thank you in advance
>>>
>>>yianis nikolaou
>>>      
>>>
>
>
>  
>



More information about the vtk-developers mailing list