Results 1 to 4 of 4

Thread: Qt cant work with opencv

  1. #1
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Qt cant work with opencv

    Hi everybody, i m a new programmer in Qt and OpenCv , i want create Qt application with OpenCv library but i cant use OpenCv in qt any more. i create a Qt Gui application (Qt 4.x) and i setup opencv2.0 too although i m not sure that it is a complete setup. i add this line to .pro file anyway :
    INCLUDEPATH += C:/OpenCV2.0/include/opencv

    win32:LIBS += "C:\OpenCV2.0\bin\libcv200.dll" "C:\OpenCV2.0\bin\libcvaux200.dll" "C:\OpenCV2.0\bin\libcxcore200.dll" "C:\OpenCV2.0\bin\libhighgui200.dll" "C:\OpenCV2.0\bin\libcxts200.dll" "C:\OpenCV2.0\bin\libml200.dll"

    when i compile the program i get 17 errors with 17 warnings ,it is like that Lib files dont load and i haven't any idea please help me.

    maybe my opencv must compile with cmake for Qt like Vs9 but i dont know what option sould select for that tanks again!

  2. #2
    Join Date
    Apr 2008
    Posts
    35
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt cant work with opencv

    that is bcoz ur trying to compile with wrong libs.. try this

    win32:LIBS+= "C:\OpenCV2.0\lib\libcv200.dll.a" "C:\OpenCV2.0\lib\libcvaux200.dll.a" "C:\OpenCV2.0\lib\libcxcore200.dll.a" "C:\OpenCV2.0\lib\libhighgui200.dll.a" "C:\OpenCV2.0\lib\libcxts200.dll.a" "C:\OpenCV2.0\lib\libml200.dll.a"

    It should work

  3. #3
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt cant work with opencv

    Thank you so much for your reply but i test that before too and i get same errors:
    cxoperations.hpp:1442: error: there are no arguments to `__exchange_and_add' that depend on a template parameter, so a declaration of `__exchange_and_add' must be available.
    cxoperations.hpp:1442: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
    cxmat.hpp:174: error: `__exchange_and_add' was not declared in this scope

    and all errors is about _exchange_and_add from another library of opencv and i think my program cant load Lib files! please help me.

  4. #4
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt cant work with opencv

    my problem is solved i setup in my computer MINGW 4.x and i change line 68 in cxoperations.hpp from
    #if __GNUC__ >= 4
    to
    #if __GNUC__ >= 4 || __MINGW32__

    and myprogram is compile thats great!
    Thanks so much!

Similar Threads

  1. Qt and OpenCV
    By malorie in forum Newbie
    Replies: 2
    Last Post: 7th March 2010, 14:57
  2. OpenCv & Qt4
    By switch in forum Qt Programming
    Replies: 0
    Last Post: 4th August 2009, 15:12
  3. JAI vs. OpenCV vs. ITK
    By tpieciak in forum General Programming
    Replies: 0
    Last Post: 8th July 2009, 13:45
  4. OpenCv + Qt
    By Janderson Borges in forum Qt Programming
    Replies: 3
    Last Post: 2nd December 2008, 13:01
  5. I've got a qt&opencv problem.
    By eralvc in forum Installation and Deployment
    Replies: 2
    Last Post: 23rd October 2008, 09:58

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.