Your INCLUDEPATH and LIBS continuation lines are all missing the ending backslash.
Your INCLUDEPATH variable makes no sense anyway. What are the "+" symbols supposed to mean?
Your LIBS variable: either list the full path to each library file OR (preferrably) use the -Lsearch_path and -lname form.
Declaring other libraries
Assuming your paths are generally correct then this should do it (these are for the binary install):
INCLUDEPATH += D:/OpenCV/build/include
# One of these variants depending on your compiler
# or an x64 version if you are building 64-bit
#
LIBS += -LD:/opencv/build/x86/vc8/lib
LIBS += -LD:/opencv/build/x86/vc9/lib
LIBS += -LD:/opencv/build/x86/vc10/lib
LIBS += -LD:/opencv/build/x86/mingw/lib
# Add the libraries you actually use with -l options.
LIBS += -lopencv_highgui246 \
-lopencv_imgproc246 \
-lopencv_objdetect246
INCLUDEPATH += D:/OpenCV/build/include
# One of these variants depending on your compiler
# or an x64 version if you are building 64-bit
#
LIBS += -LD:/opencv/build/x86/vc8/lib
LIBS += -LD:/opencv/build/x86/vc9/lib
LIBS += -LD:/opencv/build/x86/vc10/lib
LIBS += -LD:/opencv/build/x86/mingw/lib
# Add the libraries you actually use with -l options.
LIBS += -lopencv_highgui246 \
-lopencv_imgproc246 \
-lopencv_objdetect246
To copy to clipboard, switch view to plain text mode
The exact paths depend on how you installed OpenCV.
At run time the relevant D:/OpenCV/build/x86/compiler/bin directory must be in the PATH for the executable to find the DLLs.
Then in your code:
#include "opencv/cv.h"
#include "opencv/highgui.h"
int main(int argc, char** argv)
{
IplImage* img = cvLoadImage( "image.jpg" );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage("Example1", img);
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Example1" );
return 0;
}
#include "opencv/cv.h"
#include "opencv/highgui.h"
int main(int argc, char** argv)
{
IplImage* img = cvLoadImage( "image.jpg" );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage("Example1", img);
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Example1" );
return 0;
}
To copy to clipboard, switch view to plain text mode
Added after 4 minutes:

Originally Posted by
studentQt
do u think that's the exact solution? I think not
isn't there another suggestion ?
No, the exact solution requires you to gain a little understanding how a compiler and linker work together to find required components and build an executable, and how that executable finds the things it needs to run. That has little to do with Qt, however, that understanding quickly resolves exactly the sort of problems you are experiencing here.
Bookmarks