views:

595

answers:

3

I am new to OpenCV , i was following http://www.hanckmann.net/?q=node/17 tutorial to configure openCV, after configuring openCV , i get this error, could someone help me on this.

this is where it explains how to configure openCV http://opencv.willowgarage.com/wiki/VisualC++

and this is the example code i was using. it gives the error fatal error LNK1104: cannot open file 'cvcam.lib'

#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

int _tmain(int argc, _TCHAR* argv[])
{
 IplImage *img = cvLoadImage("Image.bmp");
 cvNamedWindow("Image:",1);
 cvShowImage("Image:",img);

 cvWaitKey();
 cvDestroyWindow("Image:");
 cvReleaseImage(&img);
 return 0;
}
+1  A: 

Have you defined the folder which contains the .lib files? Right-click your project name, choose Properties, select Linker->General and add the name of the directory which contains the OpenCV library files to the Additional Library Directories field.

Jacob
yes jacob, i hv done it, but still i get this error message
KItis
Does the folder contain the lib files? As in, have they been compiled? Check if `cvcam.lib` exists in the directory you've specified.
Jacob
+1  A: 

Can you try installing OpenCV 1.1prea from SourceForge? and uninstall the one you have?

Once you have done this and it works it means the library you have in your current OpenCV cannot be found. This can means either you forgot to choose Additional Library Directories (like Jacob said) or you are using OpenCV 2.0 and you didn't re-compile OpenCV for your machine (required for Windows using Visual Studio).

Dat Chu
A: 

do you get the cmake software that can compile Opencv 2.0 and 2.1 I had some problem last week.

tino