Qt Creator 2.6.0 RC won't add my freshly-compiled Qt 5
-
I'm on Windows 7 32-bit, using MinGW.org's GCC 4.7.0. I've just built Qt 5, following the instructions at http://qt-project.org/wiki/Building-Qt-5-from-Git . Compilation seemed to have gone smoothly, and qmake.exe was placed is in C:\Qt\5.0.0_git\qtbase\bin
However, when I tried to add it manually in Qt Creator 2.6.0 RC, the "select a qmake executable" dialog just closes and nothing happens. The selected version doesn't appear in my "Qt Versions" list, but I don't get any error messages either.
Oddly, when I tried to add the pre-compiled Qt5beta1 (qmake.exe was in C:\Qt\5.0.0beta1\Desktop\Qt\5.0.0-beta1\msvc2010\bin ), Qt Creator happily placed it in my "Qt Versions" list. It did warn me that "No compiler can produce code for this Qt version", but that's just 'cos I didn't install MSVC.
What could the problem be?
-
Anybody else encountered something similar?
-
That always worked for me so far. Did you follow the installation instructions in the wiki to build Qt?
-
I did, to the the best of my knowledge.
Things in PATH:
ActivePerl 5.14.2 (before Git)
Python 2.7
MinGW (with GCC 4.7.0)
Steps:
@
// Original setup
git clone git://gitorious.org/qt/qt5.git 5.0.0_git
...
perl init-repository -no-webkit --codereview-username JKSH// Prepare for building (after several weeks)
git pull --rebase
git submodule update --recursive// Build (from cmd.exe)
configure.exe -developer-build -opensource -confirm-license -nomake examples -nomake tests
mingw32-make -j 3
@It seemed to build fine (took about 2.5 hours on an Intel E7400, with 2GB RAM, while multi-tasking). Tools, DLLs, and header files were generated. Qt Creator just won't add this particular qmake.exe, but doesn't indicate why.
Edit: I just installed Qt Creator 2.6.0-RC on Windows 8 64-bit, and tried to add the same qmake.exe. My antivirus asked for permission to run qmake, I allowed it, but... no visible change.
-
I just did a clean build with MinGW. Qt Creator still silently refuses to add it to my "Qt Versions".
I might try building with MSVC2010 at some point, to see if that works.
For now, could someone please point me to the part of the code in Qt Creator which probes qmake? I'd like to try a little debugging.
Thanks!
-
Ok, I manually edited C:\Users[My Username]\AppData\Roaming\QtProject\qtcreator\qtversion
This was what it contained before:
@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorQtVersions>
<!-- Written by Qt Creator 2.5.84, 2012-11-04T19:35:57. -->
<qtcreator>
<data>
<variable>QtVersion.0</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">8</value>
<value type="QString" key="Name">Qt 4.8.3 (mingw4.4)</value>
<value type="QString" key="QMakePath">C:/Qt/4.8.3/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>QtVersion.1</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">10</value>
<value type="QString" key="Name">Qt 5.0.0 (msvc2010)</value>
<value type="QString" key="QMakePath">C:/Qt/5.0.0beta1/Desktop/Qt/5.0.0-beta1/msvc2010/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>Version</variable>
<value type="int">1</value>
</data>
</qtcreator>
@...and I inserted these lines:
@
<data>
<variable>QtVersion.2</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">9</value>
<value type="QString" key="Name">Qt 5.0.0 (mingw4.7)</value>
<value type="QString" key="QMakePath">C:/Qt/5.0.0_git/qtbase/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
@When I opened Qt Creator and went to Tools -> Options -> Build & Run -> Qt Versions, my qmake is listed, but Creator reported:
[quote]
qmake location: C:\Qt\5.0.0_git\qtbase\bin\qmake.exe
qmake does not exist or is not executable
[/quote]It certainly exists, and certainly is executable!
@
C:\Qt\5.0.0_git\qtbase\bin> qmake -vQMake version 3.0
Using Qt version 5.0.0 in C:/Qt/5.0.0_git/qtbase/lib
@I even used it to produce a Hello World QtWidgets program.
Bug in Qt Creator?
-
[quote author="roywillow" date="1352030451"]Double click qmake.exe and see if it comes up dll missing errors. If so, you may know what to do next...[/quote]Thanks for the suggestion. When I tried it, a terminal popped up briefly, qmake printed its help messages, and then the terminal closed again.
qmake works from the command line... I fed it a helloworld.pro file, and it spat out Makefiles. No other qmakes exist in my PATH
-
I found the cause, and a workaround.
My "Compilers" list contained MinGW GCC 4.4 (manually added), which I was using alongside the pre-built Qt 4.8.3. I believe this was somehow causing trouble when I tried to add my new qmake.exe, which was built using GCC 4.7. GCC 4.7 is in my PATH, and is also auto-detected, but I guess Qt Creator tried running GCC 4.4 first.
When I removed GCC 4.4 from the list, Qt Creator happily added my new qmake.exe