请问这段opencv代码为什么在debug下无法编译通过,但是release可以通过?
 #include<opencv2\core\core.hpp>
#include<opencv2\highgui\highgui.hpp>

using namespace cv;

void main()
{
    Mat image=imread("E:\\images\\07.jpg");
    namedWindow("img");
    imshow("img", image);
    waitKey(0);
}

编译环境为opencv2.4.11+vs2013。这段最简单的测试程序无法在debug下编译通过。
图片说明
图片说明
附加依赖项为
opencv_calib3d2411.lib
opencv_contrib2411.lib
opencv_core2411.lib
opencv_features2d2411.lib
opencv_flann2411.lib
opencv_gpu2411.lib
opencv_highgui2411.lib
opencv_imgproc2411.lib
opencv_legacy2411.lib
opencv_ml2411d.lib
opencv_objdetect2411.lib
opencv_ts2411.lib
opencv_video2411.lib
opencv_nonfree2411.lib
opencv_ocl2411.lib
opencv_photo2411.lib
opencv_stitching2411.lib
opencv_superres2411.lib
opencv_videostab2411.lib
opencv_calib3d2411d.lib
opencv_contrib2411d.lib
opencv_core2411d.lib
opencv_features2d2411d.lib
opencv_flann2411d.lib
opencv_gpu2411d.lib
opencv_highgui2411d.lib
opencv_imgproc2411d.lib
opencv_legacy2411d.lib
opencv_objdetect2411d.lib
opencv_ts2411d.lib
opencv_video2411d.lib
opencv_nonfree2411d.lib
opencv_ocl2411d.lib
opencv_photo2411d.lib
opencv_stitching2411d.lib
opencv_superres2411d.lib
opencv_videostab2411d.lib

报的错误是
图片说明

2个回答

你配置库有带d 和不带d的要分清楚

debug和release引用了不一样的lib或dll文件

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问