Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to set Qt version for qmake

How to set Qt version for qmake

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 2.4k 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.
  • Z Offline
    Z Offline
    zbysekvoda
    wrote on last edited by
    #1

    I need to compile Qt project on school server using qmake.
    There are several Qt versions available.
    How can I set Qt version to be used by qmake?

    I have tried to set QT_VERSION flag in .pro file but without effect.

    Thx

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Did you check this documentation - Configure Qt Kits

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zbysekvoda
        wrote on last edited by
        #3

        But this explains how to set version in GUI.
        I need to set this in termina.
        Sorry I didn't noted, that this is headless server.

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          which operating system and which qt version ? Are you able to login to the box on terminal ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zbysekvoda
            wrote on last edited by
            #5

            LSB Version: :core-4.1-amd64:core-4.1-noarch
            Distributor ID: CentOS
            Description: CentOS Linux release 7.5.1804 (Core)
            Release: 7.5.1804
            Codename: Core

            There is more qt versions there.
            Qt-4.7, Qt-4.7.4, Qt-4.8.6, Qt-5, Qt-5.2.1, Qt-5.5.1, Qt-5.9.2.

            What do you mean by "box"?
            I am able to ssh to the server with normal acount (no admin).

            aha_1980A 1 Reply Last reply
            0
            • I Offline
              I Offline
              Ilja
              wrote on last edited by
              #6

              @zbysekvoda You can/(should?) use the qmake version from the version for which you want to compile. So if you want to use Qt-5.9.2 installed in /usr/local/Qt/Qt-5.9.2 for instance, you can the qmake in /usr/local/Qt/Qt-5.9.2/gcc/bin/qmake (or a path somewhat similar to that). That will set up all the rights paths for libraries etc.

              1 Reply Last reply
              3
              • Z zbysekvoda

                LSB Version: :core-4.1-amd64:core-4.1-noarch
                Distributor ID: CentOS
                Description: CentOS Linux release 7.5.1804 (Core)
                Release: 7.5.1804
                Codename: Core

                There is more qt versions there.
                Qt-4.7, Qt-4.7.4, Qt-4.8.6, Qt-5, Qt-5.2.1, Qt-5.5.1, Qt-5.9.2.

                What do you mean by "box"?
                I am able to ssh to the server with normal acount (no admin).

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @zbysekvoda

                Just to add to @Ilja: Each Qt version has it's own qmake. By calling a specific qmake version with full path, a Makefile is generated that compiles the code for exactly this Qt versions.

                Just be sure to not mix multiple Qt versions in one folder! Best is to do out-of-source (or shadow) builds.

                Regards

                Qt has to stay free or it will die.

                1 Reply Last reply
                3
                • Z Offline
                  Z Offline
                  zbysekvoda
                  wrote on last edited by
                  #8

                  It helped. Thank you guys.

                  1 Reply Last reply
                  1

                  • Login

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