opencv2 flann logger.h uses fopen instead of fopen_s (Bug #3388)
Description
The use of fopen is deprecated on windows and causes a compilation error by default on VS 2012 (error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead.)
It would be nice to be able to compile and use OpenCV on Windows without having to set additional precompiler directives.
Steps to reproduce:
In Visual Studio 2012 create a C++ project and make sure you add #include <opencv\cv.h>.
Build the project.
Associated revisions
Merge pull request #3388 from bartaandras:master
History
Updated by Sergei Nosov over 11 years ago
Hi!
#include <opencv\cv.h> header has been kind of deprecated. You should be using #include <opencv2/opencv.hpp> instead. Also, it would be a good practice to use more specific headers, like #include <opencv/core/core.hpp>.
Does it fix the warnings?
- Status changed from New to Incomplete
Updated by Sergei Nosov over 11 years ago
- Category set to core
Updated by Goncalo Lopes over 11 years ago
Thanks. Indeed, the right includes seem to fix the issue.
- Status changed from Incomplete to Done