配置OpenCV产生flann\logger.h(66): error C4996: ‘fopen': This function or variable may be unsafe问题
轉(zhuǎn)載自:http://guoming.me/%E9%85%8D%E7%BD%AEopencv%E4%BA%A7%E7%94%9Fflannlogger-h66-error-c4996-fopen-this-function-or-variable-may-be-unsafe%E9%97%AE%E9%A2%98
今天使用vs2012配置OpenCV編譯出現(xiàn)問(wèn)題:
?
1>—— 已啟動(dòng)生成: 項(xiàng)目: Win32ForOpenCV245, 配置: Debug Win32 ——
1> ?stdafx.cpp
1> ?Win32ForOpenCV245.cpp
1>f:\softs\opencv245\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) : 參見(jiàn)“fopen”的聲明
========== 生成: 成功 0 個(gè),失敗 1 個(gè),最新 0 個(gè),跳過(guò) 0 個(gè) ==========
?
解決辦法它也寫(xiě)的很清楚,這里截圖給大家看
ok,也就是加入一個(gè)_CRT_SECURE_NO_WARNINGS的問(wèn)題。
這個(gè)問(wèn)題只有在Visual Studio 2012中才會(huì)有,2010中只是一個(gè)warning。
這個(gè)問(wèn)題不管在OpenCV2.4.4還是OpenCV2.4.5都有,其它版本可能也有。
總結(jié)
以上是生活随笔為你收集整理的配置OpenCV产生flann\logger.h(66): error C4996: ‘fopen': This function or variable may be unsafe问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: linux服务器每次重启卡住,运维如何解
- 下一篇: 计算机无法安装蓝牙驱动,windows1