我只是试图运行基本的openCV hello world教程代码,但是我遇到了错误。我已将所有内容正确链接和构建,但它无法正常工作。
这看起来应该非常简单,但它不起作用。 OpenCV已正确安装,我甚至尝试将opencv_core220d和opencv_highgui220d放在我项目的Debug文件夹中,但没有运气。
我在Windows 7 64位下运行Visual Studio 2010。
这是错误:
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Users\John\Documents\Visual Studio 2010\Projects\Webcam test\Debug\opencv_core220d.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'Webcam test.exe': Loaded 'C:\Users\John\Documents\Visual Studio 2010\Projects\Webcam test\Debug\opencv_highgui220d.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16661_none_ebfb56996c72aefc\comctl32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\avifil32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\msacm32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\msvfw32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\avicap32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'Webcam test.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
The program '[5512] Webcam test.exe: Native' has exited with code 1 (0x1).
这是我的代码:
// OpenCV_Helloworld.cpp : Defines the entry point for the console application.
// Created for build/install tutorial, Microsoft Visual Studio and OpenCV 2.2.0
#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
int _tmain(int argc, _TCHAR* argv[])
{
// Open the file.
IplImage *img = cvLoadImage("photo.jpg");
if (!img) {
printf("Error: Couldn't open the image file.\n");
return 1;
}
// Display the image.
cvNamedWindow("Image:", CV_WINDOW_AUTOSIZE);
cvShowImage("Image:", img);
// Wait for the user to press a key in the GUI window.
cvWaitKey(0);
// Free the resources.
cvDestroyWindow("Image:");
cvReleaseImage(&img);
for(int i = 0; i < 10000; i++){
printf("Error: Could");
}
return 0;
}
答案 0 :(得分:1)
我的错误,他们警告不是错误。该计划按预期运作。