Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to set sysroot correctly
Qt 6.11 is out! See what's new in the release blog

How to set sysroot correctly

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 3.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.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by
    #1

    I set up a cross-compile environment for Qt5.9. In QtCreator > Options > Build & Run > Kits I selected my sysroot folder, that look like this:

    sysroot
        lib
        opt
        usr
    

    Here there are both cross-compiled Qt5 libraries and all other system ones. QtCreator find the Qt5 ones without any problem but can't find (some) others. For example I have the following library:

    sysroot/usr/lib/arm-linux-gnueabihf/libtag.so
    

    and in my .pro file:

    LIBS += -ltag
    

    but it cannot find it, neither the include file (sysroot/usr/include/libtag/tag.h).
    Of course if I explicitly set the -L option to the right path it works, but I really don't want to do this because I will have to do for a lot of others.

    As far as I understand it should search into the sysroot path, shouldn't it?

    jsulmJ 1 Reply Last reply
    0
    • M Mark81

      I set up a cross-compile environment for Qt5.9. In QtCreator > Options > Build & Run > Kits I selected my sysroot folder, that look like this:

      sysroot
          lib
          opt
          usr
      

      Here there are both cross-compiled Qt5 libraries and all other system ones. QtCreator find the Qt5 ones without any problem but can't find (some) others. For example I have the following library:

      sysroot/usr/lib/arm-linux-gnueabihf/libtag.so
      

      and in my .pro file:

      LIBS += -ltag
      

      but it cannot find it, neither the include file (sysroot/usr/include/libtag/tag.h).
      Of course if I explicitly set the -L option to the right path it works, but I really don't want to do this because I will have to do for a lot of others.

      As far as I understand it should search into the sysroot path, shouldn't it?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Mark81 How do you include the header file?
      Did you try to put libtag.so in sysroot/usr/lib ?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mark81
        wrote on last edited by
        #3

        Well, eventually I found there were two sysroot folders, likely due to a typo in the scripts... hence it was searching in the wrong one.

        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