I'm trying to use a simple c++ code with opencv:
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <iostream>
using namespace std;
int main ( int argc, char **argv )
{
cvNamedWindow( "My Window", 1 );
IplImage *img = cvCreateImage( cvSize( 640, 480 ), IPL_DEPTH_8U, 1 );
CvFont font;
double hScale = 1.0;
double vScale = 1.0;
int lineWidth = 1;
cvInitFont( &font, CV_FONT_HERSHEY_SIMPLEX | CV_FONT_ITALIC,
hScale, vScale, 0, lineWidth );
cvPutText( img, "Hello World!", cvPoint( 200, 400 ), &font,
cvScalar( 255, 255, 0 ) );
cvShowImage( "My Window", img );
cvWaitKey();
cout << "hello world";
return 0;
}
I've included under properties-->c/c++ build-->setting-->Cygwin c++ compiler-->Includes the absolute path of my opencv/build/include, and under Cygwin c++ linker-->libraries the path and the libraries (opencv_core246, opencv_highgui246) this time with the unix-style path /cygdrive/c/... (I read someone suggest to do this). I get this error: "make: multiple target patterns. Stop." I know the problem is related to make and multiple colons in a path... I'm on Windows 7 (x64), cygwin and Eclipse. Can anyone help me? Thank you