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. How can I specify the path for the linker ?

How can I specify the path for the linker ?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 552 Views
  • 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.
  • E Offline
    E Offline
    e2002e
    wrote on last edited by
    #1

    Hi, I compiled my program and run it in QtCreator with no issues, yet when I run it from the terminal, it's looking for Qt libraries in /usr/lib/x86_64-linux-gnu/, where they are not.
    I had to run LD_LIBRARY_PATH=/home/"user"/Qt/5.12.2/gcc_64/lib ./a.out and it would run.
    (off topic note: after having done this once, I can just run ./a.out and it finds the correct libraries)

    But now the problem is that I need to run it on other computers that do not have the required libQt5Core.so version, the linker says that it cannot find it despite the fact that it's present on the system, it is not the correct version, so I have to ship libQt5core.5.12.2.so (and it's symlinks) but I don't know how to specify, at compilation, where the program has to look for the library, my choice is to put them in the same folder as the executable, for now I run LD_LIBRARY_PATH=/path/to/the/binaryAndlib/folder ./a.out and it finds the libraries but it cannot find libicui18n.so, from the name, my only guess is that it has something to do with the ndk i'm using for the android version of the program.
    How should I fix this missing library ?
    How can I avoid having to run the app with LD_LIBRARY_PATH

    My development system is Ubuntu 18.10, the laptop I failed to run the program on is also running Ubuntu 18.10.
    Thanks in advance !

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      This is normal. You should deploy your binaries to use them outside of Qt Creator.

      To deploy on Linux, you can use linuxdeployqt - it's not an official part of Qt, but it's a well-established and tested solution.

      Or you can read through the docs.

      Note: runtime library detection is not done by a linker.

      (Z(:^

      1 Reply Last reply
      3

      • Login

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