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?


Qt Code:
  1. TEMPLATE = app
  2. QT -= gui
  3. TARGET = SimpleCvApp
  5. SOURCES += main.cpp
  7. INCLUDEPATH += C:/OpenCV/opencv/modules/core/include \
  8. C:/OpenCV/opencv/modules/highgui/include
  10. # you can put the opencv .dll files where you want, this is where they are by default
  11. # if you want to use different compiler or architecture, look for the libraries for your configuration in "OpenCV2.3/build" subfolder
  12. LIBS += -L"C:/OpenCV/opencv/build/x86/mingw/bin"
  13. LIBS += -lopencv_core231 -lopencv_highgui231
To copy to clipboard, switch view to plain text mode 


Qt Code:
  1. #include <opencv2/highgui/highgui.hpp>
  2. #include <opencv2/core/core.hpp>
  4. int main(){
  5. cv::Mat image = cv::imread("C:/Users/shauri/Projects/OpenCVtest/test.jpg");
  6. cv::namedWindow("My Image");
  7. cv::imshow("My Image", image);
  8. cv::waitKey(-1);
  9. return 0;
  10. }
To copy to clipboard, switch view to plain text mode