Hello all. I have Qt 4.8.3, QtCreator 2.6.0, MinGW 4.4 (then OS Windows XP) and I want to use OpenCV 2.4.3
Can you help me to set up the project file .pro ?
Below I report a sample project that should see two figures jpg:
Qt Code:
  1. QT += core
  2. QT -= gui
  3. TARGET = testOpenCV_1
  4. CONFIG += console
  5. CONFIG -= app_bundle
  6. TEMPLATE = app
  7. INCLUDEPATH += C:\opencv\modules\core\include\ \
  8. C:\opencv\modules\highgui\include\
  9. LIBS += C:\opencv\build\x86\mingw\lib\libopencv_core243.dll.a \
  10. C:\opencv\build\x86\mingw\lib\libopencv_highgui243.dll.a
  11. SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode 
the main.cpp:
Qt Code:
  1. #include <QCoreApplication>
  2. #include <opencv2/core/core.hpp>
  3. #include <opencv2/highgui/highgui.hpp>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. QCoreApplication a(argc, argv);
  8.  
  9. // strutture dati per le immagini caricate
  10. cv::Mat immagine1;
  11. cv::Mat immagine2;
  12.  
  13. // caricamento immagine
  14. immagine1 = cv::imread("Viale.jpg");
  15. immagine2 = cv::imread("Tropici.jpg");
  16.  
  17. // verifica del corretto caricamento
  18. if(immagine1.empty() || immagine2.empty())
  19. {
  20. return -1;
  21. }
  22.  
  23. // visualizzazione immagini
  24. cv::imshow("Immagine Caricata 1", immagine1);
  25. cv::imshow("Immagine Caricata 2", immagine2);
  26.  
  27. // attesa della pressione di un tasto prima di uscire
  28. cv::waitKey();
  29.  
  30. return a.exec();
  31. }
To copy to clipboard, switch view to plain text mode 
only compiles without problems, but when I start my program I get the following message:
"Can not find the entry point _ZNSt9exceptionD2Ev the procedure in the dynamic link library libstdc++-6.dll"