Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can't add iOS OpenCV Framework in a QT Project
Forum Updated to NodeBB v4.3 + New Features

Can't add iOS OpenCV Framework in a QT Project

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 4.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aqmah
    wrote on last edited by SGaist
    #1

    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 binding, then generate a Xcode Project with quake (using command "qmake -spec macx-xcode qtopencv.pro") 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 to use 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.

    Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi and welcome to devnet,

      LIBS += \
          -F /Users/divdurch0/Desktop/qtopencv \
          -framework OpenCV
      

      And you should be good to go

      [edit: updated coding tags SGaist]

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aqmah
        wrote on last edited by
        #3

        Ah so simple, thank you very much!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Sometimes it's a bit less hard ;)

          Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved