OpenCV 和 VS 2015 C++ 再release的调试模式下出现 exception 0xC0000005

版权声明:本文为博主原创文章,转载请加入原文链接,谢谢。。 https://blog.csdn.net/shawncheer/article/details/81362370

http://answers.opencv.org/question/88927/vs-2015-c-imwrite-exception-0xc0000005/

thanks that helped, by mistake I set the same lib under the Linker settings for Debug and Release settings. After I changed opencv_world310.lib into opencv_world310d.lib (Linker-->Input-->Additional dependencies)

意思是即使在release模式下,只要调试(debug),连接器都要配置调试 版本的opencv,亲测有效。

PS:这个问题只在VS 2015上面出现,在VS2013和VS2017则没有这个问题,可以配置相应的Release和Debug版本。

本人测试了3.3.0、3.1.0、3.4.1三个版本对VS 2015的支持,发现3.3.0和3.4.1有上述的问题,而3.1.0则两个配置Debug和Release版本都没用,故推测opencv对VS2015的release x64支持上存在问题。

在VS 2015 的Release x64条件下:OpenCV3.1.0可以配置opencv_world310.lib,而OpenCV3.3.0和OpenCV3.4.1则需要换成opecv_world330d.lib和opecv_world341d.lib才能运行。(PS: 每次更换都重新生成了解决方案)

猜你喜欢

转载自blog.csdn.net/shawncheer/article/details/81362370