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. Changing qmake -query variables
Forum Updated to NodeBB v4.3 + New Features

Changing qmake -query variables

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 4 Posters 3.8k 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.
  • K Offline
    K Offline
    Kapacs
    wrote on last edited by
    #1

    I need to change all the variables under QT_SYSROOT as well as QT_INSTALL_CONFIGURATION to all be 32bit. I looked for documentation and found the qmake -set VARIABLE VALUE as a standard way of doing it however that just creates a new variable with that path instead of replacing the one under QT_SYSROOT. I attached a screenshot for clarification where you can see both versions of QT_INSTALL_PREFIX. Is there another way of doing this?

    Cheers!

    !http://i.imgur.com/6M6Sm0m.png(SCREENSHOT)!

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

      Hi and welcome to devnet,

      Why not use qmake from your 32bit Qt ?

      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
      • K Offline
        K Offline
        Kapacs
        wrote on last edited by
        #3

        This is coming through the VS2012 Developer Command Prompt which is 32bit and linking only these 64bit directories. It's giving me problems building in visual studio since the dependencies created for the executable file are all pointing towards 64bit QT files. Is there a way I can change this?

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

          If you want to create a 32bit application, then you first need to install a 32bit version of Qt

          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
          • K Offline
            K Offline
            Kapacs
            wrote on last edited by
            #5

            I had both the 32bit and 64bit versions installed however it was creating a lot of path/version conflicts. I simply uninstalled QT altogether and installed just the 32bit version by itself. Now the developer console picks only that version up and it seems to have fixed the issue.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              ambershark
              wrote on last edited by
              #6

              To answer the original question you can use a qt.conf file in your bin directory. Anything in that file will override the qmake variables.

              I had to use that when the install prefix I used when I built Qt didn't work with the windows system I was using.

              Supposedly you are able to change the variables using qmake -set <prop> <value> but mine never seems to serialize.

              Here is the "docs":http://qt-project.org/doc/qt-5/qt-conf.html on using qt.conf.

              My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

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

                The original problem was more about using the right qmake

                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
                • A Offline
                  A Offline
                  ambershark
                  wrote on last edited by
                  #8

                  Yea I was answering his question on setting variables, not solving the problem, which you had already pointed out he was using the wrong install of Qt.

                  I just wanted him to know for future reference how he could modify those Qt variables since he had asked.

                  My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Tibor Csecsei
                    wrote on last edited by
                    #9

                    I have the same issue, qmake -set QT_SYSROOT heh inserts a row to the beginning of qmake -query list, but original QT_SYSROOT follows my config.
                    qmake -query QT_SYSROOT returns with the original path and message(Sysroot dir $$[QT_SYSROOT]) prints out the original one too.
                    See my topic for details:
                    https://forum.qt.io/topic/125004/cross-compile-to-rpi-without-re-compile-qt-from-source

                    Unfortunately other property sets have no real effect too.

                    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