#include <"C:\OpenCV\build\include\opencv2\core\core_c.h">
#include <"C:\OpenCV\build\include\opencv\cxcore.h">
#include <"C:\OpenCV\build\include\opencv\highgui.h">
int _tmain(int argc, _TCHAR* argv[])
{
IplImage *img = cvLoadImage("D:\Projects\display_image\lel.bmp");
cvNamedWindow("OpenCV",1);
cvShowImage("OpenCV",img);
cvWaitKey(0);
cvDestroyWindow("OpenCV ");
cvReleaseImage(&img);
return 0;
}
I get this error when I compile the code: "Invalid argument" and "D:\Projects\display_image\Makefile.win [Build Error] [Objects/MingW/display_image.o] Error 1"
I think this might be because of how I modified the compiler options. Here are the stuff I added under Compiler options:
I have added the following commands to the linker command line under Compiler options:
-lcxcore -lcv -lhighgui -lcvaux -lcxts -lml
And added this directory to the "Binaries": C:\OpenCV\build\x86\mingw\bin
Added this to "Libraries": C:\OpenCV\build\x86\mingw\lib
And added the following directories to C and C++ Includes:
C:\OpenCV\include\opencv
C:\OpenCV\build\include\opencv
C:\OpenCV\include\opencv2
C:\OpenCV\build\include\opencv2
I'm not sure if what I did is correct.
Thanks in advance

New Topic/Question
Reply



MultiQuote




|