Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C4996 Warnings Are Not Suppressed #20

Open
WongZeHao opened this issue Mar 7, 2020 · 2 comments
Open

C4996 Warnings Are Not Suppressed #20

WongZeHao opened this issue Mar 7, 2020 · 2 comments

Comments

@WongZeHao
Copy link

WongZeHao commented Mar 7, 2020

Hi, there are C4996 warnings when I try to compile my code with #include "INIReader.h" in multiple files. I didn't add _CRT_SECURE_NO_WARNINGS for my project but it should be fine as INIReader.h attempts to suppress this particular warning for its codes using codes below.

#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif

Is there anything missing in code or I need to define _CRT_SECURE_NO_WARNINGS explicitly?


Information about the IDE I am using:

  • IDE: Visual Studio 2017
  • Windows SDK Version: 10.0.17134.0
  • Platform Toolset: Visual Studio 2017 (v141)
@jtilly
Copy link
Owner

jtilly commented Mar 9, 2020

Sorry, I have no idea. I'm not using visual studio. Do you also run into this problem with the original version of inih (https://github.com/benhoyt/inih)?

Just googling this for a second, you may need to amend the line above (see https://stackoverflow.com/a/46092214/2208605) so that it says

#define _CRT_SECURE_NO_WARNINGS 1

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

No branches or pull requests

3 participants