From: cremoni on
I have
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE
in my stdafx.h

I also have them in my project properties. But I still get these
warnings, and more:

c:\program files\microsoft visual studio 8\vc\include\cstdio(33) :
warning C4995: 'gets': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cstdio(37) :
warning C4995: 'sprintf': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cstdio(40) :
warning C4995: 'vsprintf': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cstring(20) :
warning C4995: 'strcat': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cstring(21) :
warning C4995: 'strcpy': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cwchar(34) :
warning C4995: 'swprintf': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cwchar(35) :
warning C4995: 'vswprintf': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cwchar(37) :
warning C4995: 'wcscat': name was marked as #pragma deprecated
c:\program files\microsoft visual studio 8\vc\include\cwchar(39) :
warning C4995: 'wcscpy': name was marked as #pragma deprecated

I'm not using any of the unsecure methods. The warnings are triggered
just by including (indirectly) cstdio and cwchar.

From: ilias on
Same problem.
I have added
#define _CRT_SECURE_NO_DEPRECATE
#define _SCL_SECURE_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE

but all the annoying warnings are there. I get messages like :

1>.\foodsim10.cpp(668) : warning C4996: 'strcat' was declared
deprecated
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\string.h(81) : see declaration of 'strcat'
1> Message: 'This function or variable may be unsafe. Consider
using strcat_s instead. To disable deprecation, use
_CRT_SECURE_NO_DEPRECATE. See online help for details.'

Any suggestions how to shut it off ?

 | 
Pages: 1
Prev: ___pioinfo
Next: _sntprintf and _sntprintf_s