I am working on the following code:
main.cpp
#include <QCoreApplication>
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main(int argc, char *argv[])
{
Mat image = imread("C:/Users/Public/Pictures/Sample Pictures/Tulips.jpg");
namedWindow("Image");
imshow("Image",image);
waitKey(0);
}
Test.pro
#-------------------------------------------------
#
# Project created by QtCreator 2013-05-07T10:38:38
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = Test
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += E:/Jasmin/Yohan/opencv/build/include
INCLUDEPATH += E:/Jasmin/Yohan/opencv/include/opencv2
LIBS += E:/Jasmin/Yohan/opencv/build/x86/mingw/lib/libopencv_calib3d240.dll.a
LIBS += E:/Jasmin/Yohan/opencv/build/x86/mingw/lib/libopencv_contrib240.dll.a
LIBS += E:/Jasmin/Yohan/opencv/build/x86/mingw/lib/libopencv_core240.dll.a
LIBS += E:/Jasmin/Yohan/opencv/build/x86/mingw/lib/libopencv_highgui240.dll.a
LIBS += E:/Jasmin/Yohan/opencv/build/x86/mingw/lib/libopencv_imgproc240.dll.a
When I run this code, no image is showing up, the following output get printed
Starting E:\Jasmin\Yohan\QTProjects\build-Test-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Test...
E:\Jasmin\Yohan\QTProjects\build-Test-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Test exited with code 0
Following opencv related environment variables are added to the "path" system variable
E:\Jasmin\Yohan\opencv\build\x86\mingw\bin;E:\Jasmin\Yohan\opencv\build\x86\vc10\bin
Why I am getting this issue? My QT creator version is 2.7.0
Update
This is what my debugger has to say: