Ask Your Question
0

error open cv 2.4.5 in VS2012 X64

asked 2013-05-27 03:09:22 -0600

ahmadsamiee gravatar image

i have a error in my program.help plz my error: 1> C:\opencv\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 (x86)\Microsoft Visual Studio 11.0\VC\include\stdio.h(218) : see declaration of 'fopen'

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-11-07 12:15:15 -0600

Abilio Faria gravatar image

Pay attention to the Visual Studio 2013 compiler option "SDL checks" (/sdl, Enable Additional Security Checks). If it is set to "Yes" the warning C4996 will become an error!

See http://msdn.microsoft.com/en-us/library/jj161081.aspx

edit flag offensive delete link more
1

answered 2013-05-27 03:20:39 -0600

berak gravatar image

c++ -> preprocessor -> preprocessor definitions

add _CRT_SECURE_NO_WARNINGS there


alternatively,

c++ -> general -> set "treat warnings as errors" to false

(this will generate a warning instead of an error)

edit flag offensive delete link more

Comments

thanks i don't have any error now but my program isn't run and say :

unable to start program 'C...\X64\Debug\test.exe\' Unrecognized error occured in the windows web services framework.

ahmadsamiee gravatar imageahmadsamiee ( 2013-05-27 03:57:32 -0600 )edit

unfortunately, i can't help you on that, but please clarify:

the original error went away ?


windows web services framework. ? gosh. what do you need that for ?

what kind of project did you create there ? try with a simple console application first, better even with an empty project !

berak gravatar imageberak ( 2013-05-27 04:07:50 -0600 )edit

thanks yes

ahmadsamiee gravatar imageahmadsamiee ( 2013-05-27 04:42:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-05-27 03:09:22 -0600

Seen: 3,393 times

Last updated: Nov 07 '14