Results 1 to 2 of 2

Thread: Can't add iOS OpenCV Framework in a QT Project

  1. #1
    Join Date
    Apr 2014
    Qt products
    MacOS X Windows Android

    Question Can't add iOS OpenCV Framework in a QT Project

    I'm trying to bind the OpenCV Framework which is available for iOS to a Qt 5.2 iOS Project. So far without any useful result.

    What works is to create the Qt Project without any OpenCV Framework bind, then generate a Xcode Project with quake (using command "qmake -spec macx-xcode") and then manually add the iOS OpenCV Framework to the Xcode Project. The resulting App then runs perfectly with OpenCV Support. But if I want to add a File to the Project or something effecting the Project structure then I need to use qmake and add the OpenCV Framework manually every time.

    So I need a way to tell the QT Project to use the already existing OpenCV iOS Framework and using it automatically. After doing some research on qmake I found out that there is the possibility to add an Mac/iOS Framework.

    Using following commands in the QT Pro file the Frameworkfiles seem to be added to the Project (The OpenCV Framework seems to be correctly added into the Project as it can be found in the Framework section in the qmake generated Xcode Project):

    QMAKE_LFlags += -F"/Users/divdurch0/Desktop/qtopencv/OpenCV.framework"
    LIBS += -framework "/Users/divdurch0/Desktop/qtopencv/OpenCV.framework"
    But now the Project is not compiling saying "ld:framework not found -L/Users/divdurch0/Qt5.2.1/ios/plugins/platforms". The mentioned path is not an Framework it is a lib and is correctly found as Lib if I don't add above mentioned lines - so it shouldn't be the problem.

    if I change the second line as described in several answers on the net to

    LIBS += -framework OpenCV
    it says Framework OpenCV not found and the Framework files aren't added to the qmake resulting Xcode Project.

    I hope someone knows how to do this. There must be a way maybe I am using the wrong syntax. Or any other way to add the OpenCV Framework to a iOS QT Project will be helpful.


  2. #2
    Join Date
    Apr 2014
    Qt products
    MacOS X Windows Android

    Default Re: Can't add iOS OpenCV Framework in a QT Project

    Answered at by SGaist :

    Hi and welcome to devnet,
    LIBS += \
    -F /Users/divdurch0/Desktop/qtopencv \
    -framework OpenCV
    And you should be good to go

    Need programers to hire ?

Similar Threads

  1. Replies: 4
    Last Post: 20th January 2013, 11:01
  2. Sample project ( QT4 + OpenCV) --> Request
    By andre_teprom in forum Newbie
    Replies: 12
    Last Post: 26th July 2011, 06:40
  3. How to convert QT Project to CMake project?
    By Kevin Hoang in forum Qt Programming
    Replies: 2
    Last Post: 29th March 2011, 09:48
  4. CAD GUI Framework
    By qtoptus in forum Qt-based Software
    Replies: 9
    Last Post: 4th October 2010, 13:06
  5. Replies: 1
    Last Post: 3rd December 2009, 23:34

Tags for this Thread


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.