# QT CLI Build

• 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?

• @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?

• 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

• @oliver123 said in QT CLI Build:

It works now,

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

• 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.