Hey guys,
Sorry for the newb question, I'm really stuck and I don't now how to fix this problem:
I try to use OpenCV in QtCreator under Windows 7 and I can't get it working.
I use the .pro and .cpp file below, but when I press debug it shows me an error message: "During startup programm exited with code 0xc0000139."
I also tried with console, qmake && make, the .exe is created without error message, but when I want to run it, it says libopencv_highgui231.dll is missing. If it was missing, it couldn't create the .exe in the first place, right?
I tried putting the .dll in the .exe folder, run it and the message "The procedure entry point _ZNSt9exceptionD2Ev could not be located in the dynamic link library libstdc++-6.dll" appeared.
I have no clue what's happening. Any advice?
OpenCVtest.pro
TEMPLATE = app
QT -= gui
TARGET = SimpleCvApp
SOURCES += main.cpp
INCLUDEPATH += C:/OpenCV/opencv/modules/core/include \
C:/OpenCV/opencv/modules/highgui/include
# you can put the opencv .dll files where you want, this is where they are by default
# if you want to use different compiler or architecture, look for the libraries for your configuration in "OpenCV2.3/build" subfolder
LIBS += -L"C:/OpenCV/opencv/build/x86/mingw/bin"
LIBS += -lopencv_core231 -lopencv_highgui231
TEMPLATE = app
QT -= gui
TARGET = SimpleCvApp
SOURCES += main.cpp
INCLUDEPATH += C:/OpenCV/opencv/modules/core/include \
C:/OpenCV/opencv/modules/highgui/include
# you can put the opencv .dll files where you want, this is where they are by default
# if you want to use different compiler or architecture, look for the libraries for your configuration in "OpenCV2.3/build" subfolder
LIBS += -L"C:/OpenCV/opencv/build/x86/mingw/bin"
LIBS += -lopencv_core231 -lopencv_highgui231
To copy to clipboard, switch view to plain text mode
main.cpp
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
int main(){
cv::Mat image = cv::imread("C:/Users/shauri/Projects/OpenCVtest/test.jpg");
cv::namedWindow("My Image");
cv::imshow("My Image", image);
cv::waitKey(-1);
return 0;
}
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
int main(){
cv::Mat image = cv::imread("C:/Users/shauri/Projects/OpenCVtest/test.jpg");
cv::namedWindow("My Image");
cv::imshow("My Image", image);
cv::waitKey(-1);
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks