Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

C++: Ignore warnings C4996 #30

Open
jwenjian opened this issue Jun 6, 2019 · 0 comments
Open

C++: Ignore warnings C4996 #30

jwenjian opened this issue Jun 6, 2019 · 0 comments

Comments

@jwenjian
Copy link
Owner

jwenjian commented Jun 6, 2019

C4996 occurs when the compiler encounters a function or variable that is marked as deprecated by using a __declspec(deprecated) modifier, or when you attempt to access a function, class member or typedef that has the C++14 [[deprecated]] attribute.

To ignore the warnings, do in below ways:

  1. In cpp file
#pragma warning(disable : 4996)
  1. In Commond line:
    Using the /wd4996 command line option.

  2. In Visual Studio:

  • Open the Property Pages dialog for your project. For information on how to use the Property Pages dialog, see Property Pages.
  • Select the Configuration Properties, C/C++, Advanced page.
  • Edit the Disable Specific Warnings property to add 4996. Choose OK to apply your changes.

Refer to : https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=vs-2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant