KItis
KItis

Reputation: 5626

Configuring OpenCV with visual c++ 2008

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;
}

Upvotes: 0

Views: 1769

Answers (2)

Dat Chu
Dat Chu

Reputation: 11130

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).

Upvotes: 1

Jacob
Jacob

Reputation: 34601

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.

Upvotes: 1

Related Questions