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:/usr/local/qt5.4.0/
/usr/local/qt5.4.1/I then you will find the qmake file in:
/usr/local/qt5.4.0/qt/bin/qmake
/usr/local/qt5.4.1/qt/bin/qmakeSo, 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?
-
@code_fodder
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"
-
Hi,
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):
D:\install\Qt\5.5\mingw492_32\bin>qmake.exe -query
QT_SYSROOT:
QT_INSTALL_PREFIX:D:/install/Qt/5.5/mingw492_32
QT_INSTALL_ARCHDATA:D:/install/Qt/5.5/mingw492_32
QT_INSTALL_DATA:D:/install/Qt/5.5/mingw492_32
QT_INSTALL_DOCS:D:/install/Qt/Docs/Qt-5.5
QT_INSTALL_HEADERS:D:/install/Qt/5.5/mingw492_32/include
QT_INSTALL_LIBS:D:/install/Qt/5.5/mingw492_32/lib
QT_INSTALL_LIBEXECS:D:/install/Qt/5.5/mingw492_32/bin
QT_INSTALL_BINS:D:/install/Qt/5.5/mingw492_32/bin
QT_INSTALL_TESTS:D:/install/Qt/5.5/mingw492_32/tests
QT_INSTALL_PLUGINS:D:/install/Qt/5.5/mingw492_32/plugins
QT_INSTALL_IMPORTS:D:/install/Qt/5.5/mingw492_32/imports
QT_INSTALL_QML:D:/install/Qt/5.5/mingw492_32/qml
QT_INSTALL_TRANSLATIONS:D:/install/Qt/5.5/mingw492_32/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:D:/install/Qt/Examples/Qt-5.5
QT_INSTALL_DEMOS:D:/install/Qt/Examples/Qt-5.5
QT_HOST_PREFIX:D:/install/Qt/5.5/mingw492_32
QT_HOST_DATA:D:/install/Qt/5.5/mingw492_32
QT_HOST_BINS:D:/install/Qt/5.5/mingw492_32/bin
QT_HOST_LIBS:D:/install/Qt/5.5/mingw492_32/lib
QMAKE_SPEC:win32-g++
QMAKE_XSPEC:win32-g++
QMAKE_VERSION:3.0
QT_VERSION:5.5.0 -
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!C:\Qt\5.4.1\msvc2013>qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:c:/Qt/5.4.1/msvc2013
QT_INSTALL_ARCHDATA:c:/Qt/5.4.1/msvc2013
QT_INSTALL_DATA:c:/Qt/5.4.1/msvc2013
QT_INSTALL_DOCS:c:/Qt/5.4.1/msvc2013/doc
QT_INSTALL_HEADERS:c:/Qt/5.4.1/msvc2013/include
QT_INSTALL_LIBS:c:/Qt/5.4.1/msvc2013/lib
QT_INSTALL_LIBEXECS:c:/Qt/5.4.1/msvc2013/bin
QT_INSTALL_BINS:c:/Qt/5.4.1/msvc2013/bin
QT_INSTALL_TESTS:c:/Qt/5.4.1/msvc2013/tests
QT_INSTALL_PLUGINS:c:/Qt/5.4.1/msvc2013/plugins
QT_INSTALL_IMPORTS:c:/Qt/5.4.1/msvc2013/imports
QT_INSTALL_QML:c:/Qt/5.4.1/msvc2013/qml
QT_INSTALL_TRANSLATIONS:c:/Qt/5.4.1/msvc2013/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:c:/Qt/5.4.1/msvc2013/examples
QT_INSTALL_DEMOS:c:/Qt/5.4.1/msvc2013/examples
QT_HOST_PREFIX:c:/Qt/5.4.1/msvc2013
QT_HOST_DATA:c:/Qt/5.4.1/msvc2013
QT_HOST_BINS:c:/Qt/5.4.1/msvc2013/bin
QT_HOST_LIBS:c:/Qt/5.4.1/msvc2013/lib
QMAKE_SPEC:win32-msvc2013
QMAKE_XSPEC:win32-msvc2013
QMAKE_VERSION:3.0
QT_VERSION:5.4.1C:\Qt\5.4.1\msvc2013>