我正在使用Visual 201使用OpenCv 2.4.11版本。当我尝试示例代码时,我得到了“应用程序无法正确启动0xc00007b”error.My代码如下:
#include "stdafx.h"
#include <iostream>
#include <opencv2\opencv.hpp>
using namespace std;
using namespace cv;
int main(int argc, char** argv) {
Mat img = imread("C:/Users/Murat/Desktop/lena1.png");
if (img.empty()) {
cout << "Resim yüklenemedi" << endl;
return -1;
}
namedWindow("deneme penecere ismi", CV_WINDOW_AUTOSIZE);
imshow("deneme penecere ismi", img);
waitKey(0);
destroyWindow("deneme penecere ismi");
return 0;
}我怎么才能解决问题。
发布于 2015-12-01 13:37:26
首先使用Visual 2015编译器从源代码生成OpenCV。这降低了计算机中丢失旧框架的风险。您需要将vc14目录作为库的一个源。预构建的lib仅适用于VS 2012和2013年,这是opencv/build/x64或VC11下的VC12和libs文件夹。
步骤很简单。
结果是包含libs的VC14目录。
通过图片教程检查这张图片。这里的教程
发布于 2017-01-25 20:34:55
配置步骤:
1-将bin目录中的dll添加到系统路径。
2-向项目属性-> VC++目录添加->目录
3-将lib目录中的“.lib”文件添加到项目属性-> Linker ->附加依赖项中
解释性链接
https://stackoverflow.com/questions/33046722
复制相似问题