Am I getting the correct version of Qt?



  • Hi -

    I'm still trying to master the installation and administration of Qt. I've been playing around a little, and I'm not sure I'm getting the right version of Qt from the command line.

    From a directory containing one file (hello.cpp) I issue the qmake -install command, and get a makefile. The header gives me reason for concern:

    #############################################################################
    # Makefile for building: hello
    # Generated by qmake (2.01a) (Qt 4.8.6) on: Tue Feb 28 08:41:23 2017
    # Project:  hello.pro
    # Template: app
    # Command: /usr/lib/x86_64-linux-gnu/qt4/bin/qmake -o Makefile hello.pro
    #############################################################################
    

    Qt4? I just installed this a couple weeks ago. I'm sure I have Qt5 on my system.

    In my earlier experimentation, I had a few false starts with Qt. Is there some way to to a master cleanup of Qt to eradicate any old stuff? I've run the maintenance tool, and that hasn't solved this issue.

    Thanks.


  • Lifetime Qt Champion

    Hi,

    You are likely calling your distribution provided Qt.

    Always use the full path of the one you intend to use.



  • Hi Rgaist -

    I'm not sure I know what you mean by "distribution provided," but yes, I'm finding my way to the wrong qmake.

    mzimmers@debian:~/QtStuff/hello$ which qmake
    /usr/bin/qmake
    mzimmers@debian:~/QtStuff/hello$
    

    The qmake I want is in /opt/Qt/5.8/gcc_64/bin/.

    I looked in /usr/bin, and there's a bunch of Qt stuff in there. I never specified /usr/bin as an install location, so I'm not sure how it all got there. Are these files even necessary? I'm the only user on this system.

    Thanks...


  • Lifetime Qt Champion

    That's the standard path for your distribution Qt installation.

    Don't worry about that, that's 100% fine.

    Therefore my recommendation: when your using a terminal, just use the full path to the qmake version you want to use. That way you ensure that you are calling the one you need/want.


  • Qt Champions 2016



  • @SGaist do I correctly understand that the standard Debian installation includes a version of Qt?

    And I surmise that it's probably better if I don't go into /usr/bin and try to clean it up myself, right?

    Hi, mrjj - I saw the chooser and was thinking about using it. I'll report back on how it works with Debian if I find anything wrong.

    Thanks...


  • Lifetime Qt Champion

    Debian provides both Qt 4 and Qt 5 but AFAIK, the default is still Qt 4.

    Indeed, don't go there moving stuff around, there's nothing to clean. You'll just break your co-worker setup.


  • Qt Champions 2016

    @mzimmers
    Hi
    well something like
    qtchooser -list-versions
    is not dangerous :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.