Results 1 to 9 of 9

Thread: qt is not able to locate header files of opencv

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: qt is not able to locate header files of opencv

    Actually it should work, if the paths are correct.
    Have you rerun qmake after changing .pro?
    Oleg Shparber

  2. #2
    Join Date
    Nov 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt is not able to locate header files of opencv

    umm..i have rebuilt it. But i dint get what do u mean by "re-run qmake"

  3. #3
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: qt is not able to locate header files of opencv

    After changing pro file you should run qmake again to have correct makefiles. Right click on your project and select "Run qmake".
    Oleg Shparber

  4. #4
    Join Date
    Nov 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt is not able to locate header files of opencv

    yes i followed it..but still it is not working

  5. #5
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: qt is not able to locate header files of opencv

    OK, I can't say what is wrong, but having spaces in include/lib paths isn't good (although it should work with quotes). Try to move include dir to somewhere like c:\opencv, then change .pro file:
    Qt Code:
    1. INCLUDEPATH += c:/opencv/include
    To copy to clipboard, switch view to plain text mode 
    and in your sources use:
    Qt Code:
    1. #include <opencv/cv.h>
    2. #include <opencv/cvaux.h>
    3. #include <opencv/highgui.h>
    To copy to clipboard, switch view to plain text mode 
    It should find headers fine. At least it works for me in such way in my projects.
    Oleg Shparber

  6. #6
    Join Date
    Nov 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt is not able to locate header files of opencv

    thanx Oleg Shparber!
    My problem is solved.

Similar Threads

  1. Qt header files suggestion
    By chandan in forum Newbie
    Replies: 3
    Last Post: 1st March 2011, 10:23
  2. Header Files
    By Maluko_Da_Tola in forum Newbie
    Replies: 1
    Last Post: 2nd October 2010, 12:04
  3. Replies: 2
    Last Post: 30th September 2010, 12:26
  4. Locate Class/Method from Dll hex address
    By sivrisinek in forum Installation and Deployment
    Replies: 5
    Last Post: 1st October 2009, 16:29
  5. header files problems
    By dognzhe in forum General Programming
    Replies: 1
    Last Post: 18th May 2009, 08:00

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
  •  
Qt is a trademark of The Qt Company.