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. [solved] 5.1.1 install building with 4.8?
Qt 6.11 is out! See what's new in the release blog

[solved] 5.1.1 install building with 4.8?

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 2 Posters 5.2k 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.
  • H Offline
    H Offline
    HemiMG
    wrote on last edited by
    #1

    I just installed 5.1.1 on my mac and recompiled one of my programs. I was pleasantly surprised when everything compiled without errors. However, when I ran macdeployqt, I noticed that it installed version 4 of the frameworks. At first, I thought something was wrong with macdeployqt. However, when I ran otool on the binary, it says it is linked with 4.8.2! I checked the settings in Qt Creator, and it is definitely set to use 5.1.1. What gives? How can I get Qt Creator to build with the new version?

    EDIT: It appears that the 5.1.1 installation didn't copy qmake to /usr/bin. This shouldn't be a problem though, shouldn't it look for qmake in the location given by the Qt version that I select? I've set QTDIR to the 5.1.1 location (the installer didn't do that either) I've selected it in the build settings and in the kit selection tab. I've selected it everywhere I know to, but when I removed qmake (for 4.8) from /usr/bin Creator complained about not being able to find it. Nothing I do will make it use the on in the 5.1.1 install location. I can copy that qmake to /usr/bin, but I have no idea what other files may need to be installed or where. Is there some secondary installer I need to run? I'm pretty sure when I upgraded to 4.8 from 4.6 it did it all for me.

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

      Hi and welcome to devnet,

      The latest installers (unlike the old SDK) don't install Qt in the system directories. This allows to have several versions of Qt installed at the same time without interfering with each other.

      I would recommend that you remove this old Qt (unless you really need it)

      By the way, what version of QtCreator are you using ?

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

        Thanks for the reply. I'm using Qt Creator 2.8.1, which came with 5.1.1. I also have 2.5 installed, which is what I was using before. I installed Qt into /usr/local/Qt5.1.1 because I didn't want it in my home directory, but I don't guess that would mess up anything.
        I'm not sure if I need the old Qt. I'd like to at least compile with 5.1.1 first to make sure that everything works. It seems that the opposite of what you are saying is true though, Its not letting me switch between Qt versions at all. "Qt in path" is an option in the various dialogs (what is the difference between build settings and kits? They both have you select a Qt version?) but when I select a different version, it doesn't seem to take. I'm afraid if I remove the old one I won't be able to build anything. Right now I'm behind on a deadline, so that would be disastrous.

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

          /usr/local is a standard directory for "local" installs. i.e. installing a Qt4 build by hand would end up in /usr/local/Trolltech/{bin,lib,mkspecs, etc..}. By system folder I meant /usr/bin.

          Since you're in a hurry to validate Qt 5, you could build your project from the console using the full path to your Qt5 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
          • H Offline
            H Offline
            HemiMG
            wrote on last edited by
            #5

            Thanks. I did get that to work, it complained about QLabel not being found, but that is to be expected. It might take me a while to sort out all of the changes required (especially using the command line). But, when I removed qmake from /usr/bin, Qt Creator wouldn't do anything all, complaining that it couldn't find qmake. Selecting the 5.1.1 version didn't help. If I actually delete the old Qt installs, won't that problem still exist? Will a reinstall fix it after the old ones are gone? In the project settings, I changed my QTDIR to the path for 5.1.1, but that didn't help.

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

              That one is easy, you need
              @QT += widgets@

              for Qt 5

              That's strange... Right now I can't really tell you where exactly the problem could lie (I don't use QTDIR) and generally build Qt myself.

              One quick idea that comes to my mind... It might be that the new QtCreator tries to use the configuration file of your old QtCreator and that that somehow creates a problem... 2.5 is pretty old.

              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
              • H Offline
                H Offline
                HemiMG
                wrote on last edited by
                #7

                Yeah, I saw the bit about adding widgets, but I don't really want to fully convert the thing to Qt5 and then never be able to use Creator again. Is there a way to rebuild my configuration file?

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

                  You can check the ~/.config folder for QtCreator related configuration files/folder and move them somewhere safe.

                  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
                  • H Offline
                    H Offline
                    HemiMG
                    wrote on last edited by
                    #9

                    Aha! Thanks! That appears to have worked. Although, I'm currently using the tool that I'm also trying to convert to Qt5 so I'm going to hold off on messing with it until I am done with it for the day. Thanks, again!

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

                      You're welcome !

                      If it's all working now, can you update the thread title prepending [solved] so other forum users may know a solution has been found :)

                      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

                      • Login

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