PDA

View Full Version : Kit can't detect my compiler(s) and debugger.



Iceberg9
12th August 2015, 17:48
I've had a troublesome time installing and configuring Qt. I read about it all over the internet including the Qt documentation but can't seem to get it just right. I've read several posts about this same problem but the answer for those has not worked for me. I'm a unix guy trying to work on a PC and find it contrary.

I'm thinking my installation of the various requirements is to blame for the Kit not being able to auto-detect my compiler(s) and debugger. In Options > Build & Run, only the MSVC compilers are auto detected. I manually added the g++ from cygwin and the MinGW tools but am using the MinGW compiler and debugger in the manual kit I made.
I read somewhere that the MinGW tools are the ones to use but that it is also required to have the Windows SDK installed.

I followed the order-of-installation on the Qt documentation about Windows Requirements in the SDKs and Compilers section after having installed Qt 5 and MinGW-64:
Windows SDK 7.1 with Visual Studio 2010
-- Visual Studio 2010
-- Windows SDK 7.1
-- Visual Studio 2010 SP1
-- Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1

Here are more details:
Windows 7, 64 bit, w/ 8GB RAM
Qt 5.5.0 (MSVC 2013, 32 bit), Qt Creator 3.4.2 built Jun 29 2015 from revision b57ac109a2
-- this looks very clearly at odds with the instructions to be sure to only install Visual Studio 2010
compiler: C:\MinGW_64\mingw32\bin\g++.exe
-- plus 3 compilers from MS SDK 7.1 are auto detected - MSVC)
debugger: C:\MinGW_64\mingw32\bin\gdb.exe
Versions qmake: C:\my_TOOLS\QT\5.5\winrt_x64\bin\qmake.exe
-- the Versions tab says "No compiler can produce code for this Qt version. Please define one or more compilers."

I've verified the versions of all the various requirements and, from all the many posts I've read, it seems these are the right versions to play together nicely but apparently not. Something is clearly wrong and I just can't figure out what exactly to do to fix it. I wonder if it is now so balled up that I need to uninstall the whole shebang and start again from scratch.

Should I, despite instructions to the contrary, install Windows SDK with Visual Studio 2013? Will that give me MSVC 2013?
Can someone offer any suggestions on how to get this Qt just working?

Thanks for anything.

anda_skoa
13th August 2015, 10:16
The path of the "qmake" entry does not sound like it belongs to a Qt version built with MinGW.

Did you download a MinGW build of Qt or did you build it yourself?

Cheers,
_

Iceberg9
13th August 2015, 17:24
I downloaded qt-opensource-windows-x86-winrt-5.5.0.exe.
I started this almost 2 weeks ago now.
I am brand new to Qt so thought I'd start by following the easiest, simplest path first. Download, install, run examples, do tutorials, use the MinGW tools.
I followed all the instructions but yesterday found that I had to install the Windows SDK 2013 instead of the 2010 it says in the Qt documentation about Windows Requirements in the SDKs and Compilers section. I've done that and now I have the MVCS 2013.

Still, the examples don't build. I think this is related to my original post here but seems like I ought to post that problem separately.
the errors relate to 4 .lib files not found. (windowscodecs, kernel32, and ole32 I see in my file system; runtimeobject is nowhere)

Also, in Build & Run, I don't understand why it does not auto-detect my MinGW 64 installation. I do have that in my PATH.

So, I switched to Netbeans to see if I could run it with Qt as that is documented. It started out fine but then could not find Designer. And I also don't see any designer.exe anywhere in my file system.

I'm about ready to uninstall Qt and re-install so I can start from scratch again but I worry that that will cause even more problems.

Advice would be very welcome.

anda_skoa
13th August 2015, 17:45
I downloaded qt-opensource-windows-x86-winrt-5.5.0.exe.

Any reason you did not download the version for MinGW if that is the toolchain you want to use?
Sounds like a lot of unnecessary trouble to download a package intended for use with a different toolchain, then building Qt with MinGW and adding to QtCreator manually.



I am brand new to Qt so thought I'd start by following the easiest, simplest path first. Download, install, run examples, do tutorials, use the MinGW tools.

So, why did you not do that then?
Sounds indeed like the best possible option.



I followed all the instructions but yesterday found that I had to install the Windows SDK 2013 instead of the 2010 it says in the Qt documentation about Windows Requirements in the SDKs and Compilers section. I've done that and now I have the MVCS 2013.

Which of course you don't need if you are using MinGW.



Also, in Build & Run, I don't understand why it does not auto-detect my MinGW 64 installation. I do have that in my PATH.

And qmake of your MinGW built Qt is also in PATH?

Cheers,
_

Iceberg9
13th August 2015, 18:27
By way of explaining, I clearly didn't know what I was doing and apparently it was a mistake to download that exe. My whole aim was to learn Qt. I hadn't ever heard of Qt up to a couple weeks ago much less know anything about it. Nor anything about the various pieces of software needed. I've lived almost exclusively (in my work life) in unix for many years (vi, make, command line). Although, to be fair, I did learn to use a couple gui tools on unix, mainly X based, and a couple on a PC (mail and browsers). I'm also getting used to this new 64 bit machine and the PC software world. It is odd. Sometimes you *must* use the 64-bit version of some software, other times you can't at all, and then sometimes you can just choose according to some set of needs that you'll only find out about later. And for MinGW64, it appears to be basically a wrapper around MinGW32 As I've said for many years, software is a black art.

That simplest path is indeed what I've been trying to do but have had nothing but roadblocks all along. It's a steep learning curve from zero bz following the documentation doesn't lead me in the right direction. Now I believe it all stems from my original mistake of the wrong download.

Yes, the MinGW64/MinGW32/bin is in my PATH but there is no qmake in that directory. The only qmake on my system is in QT/5.5/winrt_x64/bin

On the qt.io download page, these are the choices I see for Windows:
Windows Host
Qt 5.5.0 for Windows 64-bit (VS 2013, 650 MB) (info)
Qt 5.5.0 for Windows 32-bit (VS 2013, 633 MB) (info)
Qt 5.5.0 for Windows 32-bit (VS 2012, 587 MB) (info)
Qt 5.5.0 for Windows 32-bit (VS 2010, 585 MB) (info)
Qt 5.5.0 for Windows 32-bit (MinGW 4.9.2, 959 MB) (info)
Qt 5.5.0 for Android (Windows 32-bit, 1.0 GB) (info)
Qt 5.5.0 for Windows RT 32-bit (621 MB) (info)

Do you know if, on my 64-bit machine, will everything Qt work for me if I install the 32-bit MinGW version of Qt and use all 32-bit tools, etc.?
If I install the only 64-bit version on that list, I'll have to use Microsoft MCVS. I like to avoid MS whenever I'm not forced to use their stuff.

Thanks again for the questions and advice.

anda_skoa
13th August 2015, 19:33
I've lived almost exclusively (in my work life) in unix for many years (vi, make, command line). Although, to be fair, I did learn to use a couple gui tools on unix, mainly X based, and a couple on a PC (mail and browsers).

On Linux it would have been even easier :-)



Do you know if, on my 64-bit machine, will everything Qt work for me if I install the 32-bit MinGW version of Qt and use all 32-bit tools, etc.?

Yes, all "AMD64" systems can execute 32bit software of the same architecture.
(as opposed to Itanium64)



The only qmake on my system is in QT/5.5/winrt_x64/bin

That is the one installed by your downloaded installer, which is not a MinGW version.
Your option with your current setup is to build Qt with the compiler of your choice.

But it is far easier to download Qt for that compiler.

Cheers,
_

Iceberg9
13th August 2015, 20:08
Thanks for the info! I'm going to back up and start from scratch again. Uninstall the RT version and install the 32-bit MinGW version - still Windows but some things are dictated to me. I can grumble and chew my teeth but I still have to do it. :-) Talk about lessons learned!

Iceberg9
13th August 2015, 23:11
update:
- the Qt RT version uninstalled fine (as far as *I* can tell) using the Qt Maintenane Tool
- downloaded qt-opensource-windows-x86-mingw492-5.5.0 and installed without problem
- began with http://doc.qt.io/qtcreator/creator-build-example-application.html
from the "Help - Qt Quick Controls" link at mid-page
- in Qt, clicked Examples button . clicked Example tile Qt Quick Controls - Gallery
- checked Kit Selector and it all detected fine (yay!) for the MinGW installed with Qt (bz I explicily told it to, it is not selected by default)
- clicked the green-arrow Run
- FIRST TROUBLE:
"Executable C:\my_TOOLS\QT_5-5_32MinGW\Examples\Qt-5.5\quick\controls\build-gallery-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug\gallery.exe does not exist."
directory in red is what does not exist.

[[ will troubleshoot in a few days ]]

anda_skoa
14th August 2015, 08:23
Sounds like a weird problem in the project configuration.
Click on the "Projects" button and check the build directory there.

Cheers,
_

Iceberg9
17th August 2015, 16:41
Yes, that long-named-build directory wasn't there. I told it where to put the build and that was the last thing needed. NOW! At last!! The build builds and the run runs.
The whole trouble I experienced was due to my original download being the wrong one for what I wanted to do.
Thanks once again for your help and advice!
Next, I have to figure out how to put SOLVED in the title. > Oh - I think that was another Qt forum. This forum doesn't do that, looks like.