Trouble installing Opencv on eclipse kepler on windows

asked 2013-11-01 08:32:49 -0500

8mike gravatar image

i am trying to use opencv with Eclipse. i downloaded the latest version, i have it in my C: directory. I included "C:\opencv\build\include\" in the include under gcc c++ compiler and all the libraries inside the mingw linker, such as opencv_core246 and added "C:\opencv\build\x86\mingw\lib" in the library search path. If i run my test code eclipse crashes at the reading.

#include <opencv\cv.h>
#include <opencv\highgui.h>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <stdlib.h>
using namespace cv;
using namespace std;
int main( int argc, char** argv ){
  Mat image;
  image = imread( "a.jpg", 0 );
  if (image.data == NULL)
  {
      cout << "No image found! Check path." << endl;
      return 1;//ERROR
  }
}
edit retag flag offensive close merge delete