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. QT CLI Build
Forum Update on Monday, May 27th 2025

QT CLI Build

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 356 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.
  • O Offline
    O Offline
    oliver123
    wrote on last edited by
    #1

    Hello,

    I am trying to build a project with batch.
    Problem is I have installed another version of MinGW and the build fails due to some conflict.
    In Qt Creator I was able to set the environment variable "LIBRARY_PATH" to the QT mingw lib folder.
    This setting works, so that the project can be build from the IDE.

    Unfortunately it doesnt work for my batch script
    the scipt looks like the following:

    set LIBRARY_PATH="C:\Qt\5.13.0\mingw73_32\lib"
    qmake
    mingw32-make
    

    the makefile still has includes from my other mingw installation.
    How can I solve this problem?

    jsulmJ 1 Reply Last reply
    0
    • O oliver123

      Hello,

      I am trying to build a project with batch.
      Problem is I have installed another version of MinGW and the build fails due to some conflict.
      In Qt Creator I was able to set the environment variable "LIBRARY_PATH" to the QT mingw lib folder.
      This setting works, so that the project can be build from the IDE.

      Unfortunately it doesnt work for my batch script
      the scipt looks like the following:

      set LIBRARY_PATH="C:\Qt\5.13.0\mingw73_32\lib"
      qmake
      mingw32-make
      

      the makefile still has includes from my other mingw installation.
      How can I solve this problem?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @oliver123 Use absolute path to qmake to make sure you're using correct one.
      Same for mingw32-make.

      Did you add anything from the other MinGW installation to PATH?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • O Offline
        O Offline
        oliver123
        wrote on last edited by
        #3

        It works now, I added the path to the QT mingw32-make to my system path and rebooted.
        Not sure if this was the cause, but not it works

        Pablo J. RoginaP SGaistS 2 Replies Last reply
        0
        • O oliver123

          It works now, I added the path to the QT mingw32-make to my system path and rebooted.
          Not sure if this was the cause, but not it works

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @oliver123 said in QT CLI Build:

          It works now,

          Great!, so please don't forget to mark your post as solved!. Thanks.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • O oliver123

            It works now, I added the path to the QT mingw32-make to my system path and rebooted.
            Not sure if this was the cause, but not it works

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            @oliver123 said in QT CLI Build:

            It works now, I added the path to the QT mingw32-make to my system path and rebooted.
            Not sure if this was the cause, but not it works

            You shouldn't do that at the system level. This will come back and bite you in the future.

            Only configure the command line you are using with that path. Its also how you work with e.g. Visual Studio. They provide a set of shortcuts that do some initialisation of the terminal and you can then use it for building what you want.

            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
            1

            • Login

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