Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Select Qt Lib from command line for compile

    General and Desktop
    3
    4
    61
    Loading More Posts
    • 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.
    • ocgltd
      ocgltd last edited by ocgltd

      I have 2 versions (Kits) of the Qt libs installed (5.9.9. and 5.15.2). I pick between them in Qt Creator (bottom left button) and that works fine while developing in Qt Creator. (I'm working in Linux)

      When I build my product for release I do so from the command line (using bash script which calls qmake). How do I tell QMAKE which kit to use? I suspect qmake is using the wrong kit.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You don't, you call the qmake executable that is provided with the Qt version you want to use.

        That's what Qt Creator does as well.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        ocgltd 1 Reply Last reply Reply Quote 1
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          You don't, you call the qmake executable that is provided with the Qt version you want to use.

          That's what Qt Creator does as well.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          ocgltd 1 Reply Last reply Reply Quote 1
          • JoeCFD
            JoeCFD last edited by JoeCFD

            You have to set env variables for QT_DIR/bin qmake and its QT_DIR/libs in order to build from command line. They are set in Qt Creator as well.
            The commands can be found on compile output tab of Qt creator when run qmake is clicked in the project or in the Makefile which is located in the build folder

            1 Reply Last reply Reply Quote 0
            • ocgltd
              ocgltd @SGaist last edited by

              @SGaist I now see there is a seperate qmake file in /opt/Qt/5.9.9 and /opt/Qt/5.15.2 so that explains it! Thaks

              1 Reply Last reply Reply Quote 0
              • First post
                Last post