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 to compile Qt app with specify version dependency (Linux)
Qt 6.11 is out! See what's new in the release blog

How to compile Qt app with specify version dependency (Linux)

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 1.6k 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.
  • L Offline
    L Offline
    ludek.vodicka
    wrote on last edited by
    #1

    Hello there,

    I'm not sure how to describe it correctly, but I have a following problem.

    I need to compile my Qt application with exactly dependency to specific Qt version. Currently when I compile my app on linux and try

    @ldd Application@

    I'm getting following result

    @...
    libQtCore.so.4 => /usr/local/Trolltech/...
    ...@

    What I would like to achieve is this:

    @libQtCore.so.4.8.2 => /usr/local/Trolltech/...@

    The reason for this requirement is a deployment of my app. I would like to distribute my App together with default Qt libraries in one directory. I already updated rpath to APP/libs directory and everything works fine, until I tried to distribute my app to system with newer version of Qt.

    In such cases I'm getting a following error:

    @Cannot mix incompatible Qt library .....@

    Thank you for any suggestions.
    Ludek

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

      Compile statically. Be very careful about licensing, though. You need to make your app licensed under either GPLv3, or commercial.

      Alternatively, take a look at how Qt Creator works - it bundles it's own version of Qt libraries on every platform, independent from OS Qt.

      (Z(:^

      1 Reply Last reply
      0
      • L Offline
        L Offline
        ludek.vodicka
        wrote on last edited by
        #3

        Thank you for reply. Unfortunately I can't use static link because of license restriction. I'm using free version of Qt and I don't want to distribute it under GPL.

        I will take a look at Qt creator distribution, but some simpler example would be a better ;-)

        Thanks.

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

          No need to examine the whole source code, just take a look at qtcreator.pro and shell scripts used to run it.

          (Z(:^

          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