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. Different version on the same machine

Different version on the same machine

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 3 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.
  • _ Offline
    _ Offline
    _Mark_
    wrote on last edited by
    #1

    In a Debian environment I had to install different versions of Qt due to some incompatibility of third-part libraries. I need to write a script which should launch two executable compiled with the two different versions of Qt.

    It's enough to export the bin directory to the PATH variable just before launch them or I have to take care of anything else?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      portoist
      wrote on last edited by
      #2

      Hello, I have also two versions of Qt on my debian (namely Qt 5.0.2 and Qt 5.1.1).
      When I build my application using qmake from Qt 5.0.2 directory, then application uses Qt 5.0.2 library. If I build it using qmake from Qt 5.1.1, then it uses Qt 5.1.1.
      You can try using LD_LIBRARY_PATH env variable and setting it to a different Qt versions before launching your app. To see what version of Qt application uses you can use:
      @
      qDebug() << qVersion();
      @

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

        I think you can skip writing your script and use Thiago's "qtchooser":https://qt.gitorious.org/qt/qtchooser for this.

        In general, setting LD_LIBRARY_PATH is essential, while PATH and QTDIR is a nice bonus. The only problematic part can be plugins, which can include a different version of Qt and cause clashes (that is a problem on KDE, usually).

        (Z(:^

        1 Reply Last reply
        0
        • _ Offline
          _ Offline
          _Mark_
          wrote on last edited by
          #4

          Thank you both. I'm looking through the Thiago's qtchooser.

          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