Ask Your Question
0

Problem on Set up Opencv on VS2010

asked 2014-08-01 15:01:30 -0600

sao gravatar image

updated 2014-08-01 15:02:01 -0600

I try to set up Opencv2.4.9 on VS2010(32 bit) on my 64 bit Win7.

I set the Environment Path to both ..\opencv\build\x64\vc10\bin and ..\opencv\build\x86\vc10\bin

In VS2010,

I set Executable Directories to ..\opencv\build\x86\vc10\bin;

Include Directories to ..\opencv\build\include; ..\opencv\build\include\opencv; ..\opencv\build\include\opencv2

Library Directories to ..\opencv\build\x86\vc10\lib

and includes all these libs: opencv_calib3d249d.lib opencv_contrib249d.lib opencv_core249d.lib opencv_features2d249d.lib opencv_flann249d.lib opencv_gpu249d.lib opencv_highgui249d.lib opencv_imgproc249d.lib opencv_legacy249d.lib opencv_ml249d.lib opencv_nonfree249d.lib opencv_objdetect249d.lib opencv_photo249d.lib opencv_stitching249d.lib opencv_ts249d.lib opencv_video249d.lib opencv_videostab249d.lib

But I still can't run the most simple example:

#include "cv.h"
#include "highgui.h"

using namespace cv; 
using namespace std; 

int main(int argc, char* argv[])
{
Mat img = imread("lena.jpg"); 

if(!img.data) 
{
    cout<<"error"<<endl;
    waitKey();
    return -1; 
}
namedWindow("loveLena", CV_WINDOW_AUTOSIZE);

imshow("loveLena", img);

waitKey();

return 0;

}

It reports:

'test.exe': Loaded 'C:\Users\Admin\Documents\Visual Studio 2010\Projects\test\Debug\test.exe', Symbols loaded.
'test.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'test.exe': Loaded 'D:\unzip_cv\opencv\build\x86\vc10\bin\opencv_core249d.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Cannot find or open the PDB file
'test.exe': Loaded 'D:\unzip_cv\opencv\build\x86\vc10\bin\opencv_highgui249d.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'test.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll', Cannot find or open     the PDB file
'test.exe': Loaded 'C:\Windows\SysWOW64\avifil32.dll ...
(more)
edit retag flag offensive close merge delete

Comments

1

look at your code, it exited with -1 meaning: your image was not found.

(also, you're safe to ignore the 'Cannot find or open the PDB file' messages. the resp. PDB files are not supplied. if you really need them, rebuild the opencv libs locally)

berak gravatar imageberak ( 2014-08-02 02:54:52 -0600 )edit

Yes. The image location is not correct. I put it with my source file. I changed my image location and it works well. Thanks.

sao gravatar imagesao ( 2014-08-05 08:53:19 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-01 17:25:36 -0600

Anna Lina gravatar image

I think the answer is here : mjepson

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-01 15:01:30 -0600

Seen: 1,293 times

Last updated: Aug 01 '14