Wrong version of qmake being called in Qt Creator
I define a kit in Qt Creator as a custom 5.4.1. The SDK uses 5.4 as an auto detected kit. When I select the custom 5.4.1 kit, the 5.4 qmake is called, not the 5.4.1. Is there a way to change what creator sees as the kit to use? I've burned a lot of time on this and have defined custom kits when needed. For example. I have a custom build of a release that was for 5.1.1 and that worked fine verses the standard 5.1.1. The custom build had less dependencies required. i.e. web kit, Unicode, OpenGL etc.
@astodolski When you add the kit you need to do three steps usually (or maybe just two).
First is you add the kit and call it whatever you want.
Second you have to point it to a version of Qt. This is done in a different tab called Qt Versions. This is generally an easy step, you make a new version and then point it to the qmake executable in your Qt install folder. So lets say you have two version of Qt:
I then you will find the qmake file in:
So, there is an option in your new qt version to browse to find qmake (the paths I used may not be 100% accurate, that is from memory). Select the qmake file, then in the background qt creator runs "qmake -query" to finds the various directories it needs.
Back in your new custom kit you have to then select the qt version - it is one of the options, if you can't see it scroll down - I have missed it in the past, but it is there :o
This should link your new kit with the version of Qt you want to use.
The third step is to select the compiler, but this is often auto-selected and correct (and I don't think this is your issue).
I've done all that and in prior versions that went without issue. As stated previously, I have been successful doing this and know how to set up custom kits. The issue in this case is that the qmake is being called out of the wrong kit (the 5.4 kit versus the 5.4.1). Is it possible to modify what Qt creator uses as Auto detected?
Ah, do you mean that when you select the qmake in your custom 5.4.1 install area, it selects the install for 5.4? - i.e. the qmake -query command is getting it wrong?
I mean that when I define the custom kit, I point it to the location of the qmake that is used for that particular kit. When I build the wrong qmake is called.
hmm, it must be that the qmake -query command is somehow getting it wrong (that is what is used when you select that qmake file in the qt versions list.
Can you run and print the results of that command from your qt5.4/.../bin/qmake and also from your qt5.4.1/.../bin/qmake
15:05:11: Running steps for project demo2...
15:05:11: Starting: "C:\Qt\5.4\msvc2013\bin\qmake.exe" "C:\Users\Default.WIN-SHC18RVLNPH\Documents\Qt Projects\SmtpClient-for-Qt-1.1\demos\demo2\demo2.pro" -r -spec win32-msvc2013 "CONFIG+=debug"
15:05:12: The process "C:\Qt\5.4\msvc2013\bin\qmake.exe" exited normally.
15:05:12: Elapsed time: 00:01.
The above is the compile output for the 5.4.1
When I change to a kit that points to Qt 5.4 and point to the 5.4 qmake, a dialog pops up and states that the Qt version is already registered as "Qt 5.4.1 MSVC2013 32 bit"
Can you share your Kit and Qt Version panel content ?
Can this new version of the forum support screen shots?
@astodolski If the wrong qmake is called it must be pointing to the wrong path for qmake in your qt version (or your kit is pointing to the wrong qt version). But I agree it would be easier to see your setup screen shots : )
When you run the qmake -query (from command line) you should get an output something like (note it shows all the variable paths that are setup):
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!