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. Correct way to use external lib in cross compiling like curses
Forum Updated to NodeBB v4.3 + New Features

Correct way to use external lib in cross compiling like curses

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 3.1k 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.
  • Z Offline
    Z Offline
    zamek
    wrote on last edited by
    #1

    Hi All,

    I have a project which is running in i386 linux and arm linux (wandboard debian hf) too.
    In i386 I can use curses very easy.

    in .pro: unix:!macx: LIBS += -lncurses

    There is a debian distrib on the arm device, where installed curses too from package.

    /usr/lib/arm-linux-gnueabihf/
    libncurses.so
    libncurses.a
    libncurses++.a

    I would like to crosscompiling in i386 debian linux device with linaro arm cross compiler.
    When I want to crosscompiling to arm debian it said: curses.h not found.
    Its correct because cc uses its own include and lib dirs.

    I tried:

    • copy curses.h to linaro_root/arm-linux-gnueabihf/libc/usr/include

    • copy libncurses* libs to linaro_root/arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabihf dir

    After that compiler can compile, but cannot links: cannot find libncurses.so.5

    maybe it is not the correct way to set external lib?

    How can I set an external lib to use in arm crosscompiling?

    thx a lot
    Zamek

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zamek
      wrote on last edited by
      #2

      I found a libncurses.so.5 in /usr/lib directory of arm device.
      After I copied it into the lib of linaro directory, compiler missed tinfo lib.
      I found an libtinfo.a and I copied it into linaro.
      Finally I can compile the arm target and it works well, but I don't think it is a correct way.

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

        Hi,

        Technically, you need to provide your cross-compiling environment with the missing libraries/headers in order to build. One way is to cross-compile all dependencies and install them in your cross-compiling environment or get pre-built packages like those from debian's armel port. Also depending on what you use to generate the root fs (e.g. the yocto project) you would just need to add these packages.

        Hope it helps

        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
        • Z Offline
          Z Offline
          zamek
          wrote on last edited by
          #4

          Hi,

          Thx a lot, I think there are some apps to manage cross system.
          Yes you are right, it seems to be all of environment differ a little. I use Linaro, I'm going to check that.

          thx
          Zamek

          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