【发布时间】:2015-01-29 05:42:18
【问题描述】:
我在互联网上应用了安装 opencv 2.9 的教程,但我明白了
Unhandled exception at 0x00007FFC6470C0B4 (ntdll.dll) in Project11.exe:
0xC0000135: Unable to Locate DLL.
我尝试了以下代码,但无法解决。
#include "stdafx.h"
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <stdio.h>
#include "opencv.hpp"
int main(){
CvCapture *camera=cvCaptureFromFile("rtsp://192.168.1.19:554/0/1:1/main");
if (camera==NULL)
printf("camera is null\n");
else
printf("camera is not null");
cvNamedWindow("img");
while (cvWaitKey(10)!=atoi("q")){
IplImage *img=cvQueryFrame(camera);
cvShowImage("img",img);
}
cvReleaseCapture(&camera);
}
【问题讨论】:
-
正如错误消息所说,它无法找到 dll。你的包含很奇怪!在你使用 opencv.hpp 时,这意味着你必须使用 c++ opencv api,但你的代码是 C 语言,我肯定会推荐 C++,你的生活会更轻松
-
@Engine 我会亲自处理您的拼写/语法...
-
@Engine 他们的
#includes 很奇怪,因为他们试图使用库中源代码中的单个代码文件。 -
@cybermonkey 他刚刚编辑了这个绝对错误的问题!
-
@Engine 嗯?我不明白。