我知道以前有人问过这个问题。但我需要一个真正的答案,一个真正的解释!当运行 (ctrl+F5) 下面显示的代码时,在 Visual Studio 2012 Express 中,在Release 模式下,一切正常。在调试模式下运行它时,我得到:
程序无法启动,因为您的计算机中缺少 MSVCP100.dll...
我已经安装了 Redistributable Package 2010 和 2012。
到底是怎么回事???请详细的解释,我能理解:) 非常感谢!!!
#include "stdafx.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
Mat image = imread("Bild.jpg");
namedWindow("Mein Bild");
imshow("Mein Bild", image);
waitKey(5000);
//The member variable data is in fact a pointer to the allocated memory block that will contain
//the image data. It is simply set to 0 when no image has been read.
if(!image.data)
{
cout<<"No image has been createt"<<endl;
}
cout<<"height = " << image.size().height <<"\t width = "<< image.size().width<<endl;
//page 27
return 1;
}