Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Configuration OpenCV for iOS
Forum Updated to NodeBB v4.3 + New Features

Configuration OpenCV for iOS

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
10 Posts 2 Posters 2.4k 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.
  • D Offline
    D Offline
    Discode
    wrote on last edited by
    #1

    Hello there;
    I have a problem with integrating opencv library and Qt Creator 4.5.0 on Qt 5.10.0;
    following instructions i added opencv to .pro file like this:

    macx {
    LIBS += -L/usr/local/lib
    CONFIG  += link_pkgconfig
    PKGCONFIG += opencv
    }
    
    

    and it works properly on Mac; but i tried to deploy it on iOS by adding opencv framework:

    ios {
    LIBS += \
             -F $$PWD/ios \
             -framework opencv2
    }
    

    and it's not working , i have 2 error here ,

    1. "No such file or directory" on #include opencv
    2. "symbol(s) not found for architecture arm64"
      would you please help me to show me my mistake and maybe solve it?

    Thank you

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

      Hi and welcome to devnet,

      Did you compile OpenCV for iOS ?
      If so, did you compile what architecture did you compile it for ?
      If not, how did you obtain it ?

      The include statement you show looks wrong, what's the real one ?

      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
      1
      • D Offline
        D Offline
        Discode
        wrote on last edited by Discode
        #3

        Hi SGaist and Thanks for replay;
        I tried compile it and make opencv.framework from an instruction with terminal
        and i have a framework file and a folder "build" beside it that's include various architects ;
        but seems i did something wrong. (it's not working)

        #include "opencv2/opencv.hpp"
        #include "opencv2/highgui/highgui.hpp"
        #include "opencv2/imgproc/imgproc.hpp"
        

        i am using same codes for Mac and iOS, my codes are working on Mac properly

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

          Where did you get the instructions from ?

          What exactly do you have in the resulting framework ?

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

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            Where did you get the instructions from ?

            What exactly do you have in the resulting framework ?

            D Offline
            D Offline
            Discode
            wrote on last edited by
            #5

            @SGaist
            I use this link to compile opencv framework:
            https://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html

            and in result i have a folder "ios" which contains framework and build subfolder
            Screenshot
            https://drive.google.com/open?id=1S1fN2aSXxcNhobXQxPLqMVM1_PLdNsOY

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

              Did you check that the framework you are linking to does indeed contain all the required architectures ?

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

              D 1 Reply Last reply
              0
              • SGaistS SGaist

                Did you check that the framework you are linking to does indeed contain all the required architectures ?

                D Offline
                D Offline
                Discode
                wrote on last edited by
                #7

                @SGaist said in Configuration OpenCV for iOS:

                Did you check that the framework you are linking to does indeed contain all the required architectures ?

                Yes , i checked architectures before open this topic,

                below is getting lipo -info from my framework:
                localhost:opencv2.framework username$ lipo -info opencv2
                Architectures in the fat file: opencv2 are: armv7 armv7s i386 x86_64 arm64

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

                  Then did you check that the linker does indeed find your self-built framework of OpenCV ?

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

                  D 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Then did you check that the linker does indeed find your self-built framework of OpenCV ?

                    D Offline
                    D Offline
                    Discode
                    wrote on last edited by Discode
                    #9

                    Dear @SGaist :
                    Actually this "opencv2.framework" is working properly in XCode, i'm not a professional but i think something wrong is linking Qt to framework ;
                    How i can check that linker in my project ?
                    Just for remembrance i have the yellow line on "#include "opencv2/opencv.hpp" and tooltip says : "No such file or directory".

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

                      Just realized:
                      @Discode said in Configuration OpenCV for iOS:

                      -F $$PWD/ios

                      You are using that option wrong, remove that space between the capital F and the $

                      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