New to Opencv

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

New to Opencv

sriharshaputhi13
Hi!

I have just started playing around with OpenCV 2.0 and Visual Studio 2008.

I am trying to run the basic program as per the book. I have done the setup as suggested by the opencv website.

Here's what I am doing:

// Hello.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

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

int main(int argc, char* argv)
{
        IplImage* img = cvLoadImage("Image.bmp");
        cvNamedWindow("Image", 1);
        cvShowImage("Image", img);
        cvWaitKey(0);
        cvDestroyWindow("Image");
        cvReleaseImage(&img);
        return 0;
}

Below is the error I am getting:

Linking...
LINK : fatal error LNK1104: cannot open file 'cv200d.lib'

I have added cv200d.lib (and other library files) as an additional dependency for the project.

Please help...

Reply | Threaded
Open this post in threaded view
|

Re: New to Opencv

Jean-Pierre Landry
You have to specify the lib dependencies and also the lib path...
You might be missing that last part...

sriharshaputhi13 wrote:

> Hi!
>
> I have just started playing around with OpenCV 2.0 and Visual Studio 2008.
>
> I am trying to run the basic program as per the book. I have done the setup as suggested by the opencv website.
>
> Here's what I am doing:
>
> // Hello.cpp : Defines the entry point for the console application.
> //
>
> #include "stdafx.h"
>
> #include <cv.h>
> #include <cxcore.h>
> #include "highgui.h"
>
> int main(int argc, char* argv)
> {
> IplImage* img = cvLoadImage("Image.bmp");
> cvNamedWindow("Image", 1);
> cvShowImage("Image", img);
> cvWaitKey(0);
> cvDestroyWindow("Image");
> cvReleaseImage(&img);
> return 0;
> }
>
> Below is the error I am getting:
>
> Linking...
> LINK : fatal error LNK1104: cannot open file 'cv200d.lib'
>
> I have added cv200d.lib (and other library files) as an additional dependency for the project.
>
> Please help...
>
>
>
> ------------------------------------
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>    Get Emails (get all posts)
>    Daily Digest (one summary email per day)
>    Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]