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. Select Qt Lib from command line for compile
QtWS25 Last Chance

Select Qt Lib from command line for compile

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 262 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by ocgltd
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      ocgltdO 1 Reply Last reply
      1
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #3

        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
        0
        • SGaistS SGaist

          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.

          ocgltdO Offline
          ocgltdO Offline
          ocgltd
          wrote on last edited by
          #4

          @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
          0

          • Login

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