Skip to content

Visual Studio: warning C4996: 'fopen': This function or variable may be unsafe. #30

@end2endzone

Description

@end2endzone

Cpp files generated by bin2cpp uses fopen() function. On Windows, using this function generates a warning message:

warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

The solution is to add the following in cpp files before the first include:

#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS
#endif

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions