0

I'm currently testing OpenCV with a program I've found on the Internet. Here is the code:

#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui_c.h>

using namespace cv;

int main( int argc, char** argv )
{
  Mat image;
  image = imread( argv[1], 1 );

  if( argc != 2 || !image.data )
    {
      printf( "No image data \n" );
      return -1;
    }

  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", image );

  waitKey(0);

  return 0;
}

The problem appears when I try to build the project on Eclipse Platform v3.7.2, I get this error (please refer to the attached photos below), but I don't know how I can fix it, can anybody help?

Error 1

Error 2

Peter David Carter
  • 2,548
  • 8
  • 25
  • 44
EArevalo
  • 9
  • 2
  • Please post error messages as verbatim text. Screenshots are rarely helpful (especially if you don't have enough rep to post them). – πάντα ῥεῖ May 11 '16 at 23:55
  • @πάνταῥεῖ Thanks for the reply. You think is a problem with the libraries? – EArevalo May 12 '16 at 00:03
  • Sure, you probably missed to specify the appropriate libraries for linking. The more general dupe is linked in the answer: [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – πάντα ῥεῖ May 12 '16 at 00:04

0 Answers0