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. How can i cross-compile opencv and qt code using same compiler generated by yocto?
Qt 6.11 is out! See what's new in the release blog

How can i cross-compile opencv and qt code using same compiler generated by yocto?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 3 Posters 1.8k 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.
  • S Offline
    S Offline
    Sumit
    wrote on last edited by
    #1

    In order to cross-compile QT code for my target i had a SDK generated by Yocto using
    bitbake meta-toolchain-qt5
    For opencv i had separate sdk.

    What i observed is QT SDK doesnot have Opencv files as it should not be because it is for cross-compiling QT application. But opencv SDK has QT libraries but no qmake.
    What i did i used sysroot path of Opencv SDK which has libraries for both opencv and QT and compiler and qmake path from QT SDK.
    The error i get is:
    libpthread and libpthread_nonshared not found.
    Qt creator always searches the libs in /usr/lib instead of /opt/poky/1.6.1/.....
    Is that the right way to compile an application both with QT and opencv for Yocto linux image?

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

      Hi,

      What do you mean by "You have a separate SDK" ?

      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
      • S Offline
        S Offline
        Sumit
        wrote on last edited by
        #3

        I had a separate SDK for Opencv which doesnot have qmake to compile Qt applications. But i had found a way to have a single SDK which compiles both opencv and qt applications.

        Solution i:
        Add to the image recipe against which you want to build the SDK:
        inherit populate_sdk_qt5.
        Now the do_populate_sdk task knows the target and will install the needed headers and libs on the respective sysroot.

        Thanks

        S 1 Reply Last reply
        0
        • S Sumit

          I had a separate SDK for Opencv which doesnot have qmake to compile Qt applications. But i had found a way to have a single SDK which compiles both opencv and qt applications.

          Solution i:
          Add to the image recipe against which you want to build the SDK:
          inherit populate_sdk_qt5.
          Now the do_populate_sdk task knows the target and will install the needed headers and libs on the respective sysroot.

          Thanks

          S Offline
          S Offline
          swansorter
          wrote on last edited by
          #4

          @Sumit i am also facing same problem plz guide me to fix this problem

          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