none
Warnings C4995

    Question

  • Hello,

    Can someone help me to correct those warnings.

    Code Snippet

     warning C4995: 'gets': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdio(37) : warning C4995: 'sprintf': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdio(40) : warning C4995: 'vsprintf': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstring(20) : warning C4995: 'strcat': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstring(21) : warning C4995: 'strcpy': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cwchar(34) : warning C4995: 'swprintf': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cwchar(35) : warning C4995: 'vswprintf': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cwchar(37) : warning C4995: 'wcscat': name was marked as #pragma deprecated
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cwchar(39) : warning C4995: 'wcscpy': name was marked as #pragma deprecated



    I tried to include
    _CRT_NONSTDC_NO_DEPRECATE
    _CRT_SECURE_NO_DEPRECATE

    And I also tried to add it into the compiler propreties:
    go to "Configuration Properties" --> "C/C++" --> "Command Line"
    3. In "Additional options" textbox enter the folowing text
        /D "_CRT_SECURE_NO_DEPRECATE"

    But without any succes!
    I am wondering how can it looks for this

    "C:\Program Files\Microsoft Visual Studio 8\VC\include\" directory since I am not telling this path into the VC++ Directory settings.
    I use the new SDK:
    "C:\Program Files\Microsoft SDKs\Windows\v6.0\Include"

    Does anyone know how to fix those errors.

    Cheers
    Tuesday, May 29, 2007 9:19 AM

Answers

  • Try adding 4995 to the specifically ignored warning codes in your project properties => configuration properties => c/c++ => advanced section.
    Tuesday, May 29, 2007 9:46 AM

All replies