Results 1 to 2 of 2

Thread: Qt 4.8.3 - QtCreator 2.6.0 - MinGW 4.4 and OpenCV 2.4.3

  1. #1
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt 4.8.3 - QtCreator 2.6.0 - MinGW 4.4 and OpenCV 2.4.3

    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"

  2. #2
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [RESOLVED] Re: Qt 4.8.3 - QtCreator 2.6.0 - MinGW 4.4 and OpenCV 2.4.3

    The problem is the version of MinGW 4.4 which creates this kind of message when you try to use OpenCV.
    To remedy the problem, simply download the latest stable version (4.6.1) by choosing the first option that comes forward in the discharge of MinGW (packaged form). Recompiling the project which I quoted in the previous post, everything is ok and the program finally works.

Similar Threads

  1. QtCreator and OpenCV, .dll missing
    By schludy in forum Installation and Deployment
    Replies: 4
    Last Post: 5th December 2011, 15:37
  2. Qt Creator How to build QtCreator with mingw?
    By FinderCheng in forum Qt Tools
    Replies: 0
    Last Post: 28th August 2011, 01:41
  3. Compile Qtcreator with mingw ?
    By tonnot in forum Installation and Deployment
    Replies: 13
    Last Post: 3rd November 2010, 22:00
  4. Problem with QtCreator + OpenCV
    By rastru in forum Newbie
    Replies: 3
    Last Post: 24th September 2010, 21:34
  5. Qt Creator Problem with QtCreator + OpenCV
    By rastru in forum Qt Tools
    Replies: 0
    Last Post: 28th July 2010, 22:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.