Ask Your Question
0

Cant run my OpenCV first code

asked 2013-03-05 17:53:09 -0600

Uzair gravatar image

updated 2013-03-05 23:37:41 -0600

1>------ Build started: Project: opencv1, Configuration: Debug Win32 ------
1>  opencv1.cpp
1>c:\opencv\build\include\opencv2\flann\logger.h(66): error 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.
1>          c:\program files\microsoft visual studio 11.0\vc\include\stdio.h(218) : see declaration of 'fopen'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

KEEP getting this error :/...Please help me

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-03-05 18:11:03 -0600

awknaust gravatar image

Follow the steps described here

Basically the MSVC doesn't like that OpenCV is using fopen, but unless you want to edit OpenCV the only option is to tell MSVC to ignore this problem. The quick fix is to add

#define _CRT_SECURE_NO_WARNINGS

Before you include the opencv header. Alternately you can change this in your project settings.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-05 17:53:09 -0600

Seen: 6,527 times

Last updated: Mar 05 '13