PDA

View Full Version : qmake not existing



Yes
12th November 2011, 19:50
Hi!

I know this is a real newbie question, but what should I do in order to be able to compile with Qt Creator? I have just removed Qt library from my computer, and installer Qt Creator instead, since I realized Qt and Visual Studio wasn't a very good idea after having heard about Qt Creator. However, when I try to compile, I get the following build issue:


The Qt version is invalid: qmake does not exist or is not executable

Also, many guides and tutorials for Qt Creator says that you should select Qt version by going into Tools->Options...->Qt4 and from there select the version after clicking the Add button, but they don't say where you look for it or how to get one if you don't have one. Other tutorials just don't mention it at all.

Before, when I still had Qt library installed, I had selected a qmake.exe file but it was deleted when I removed Qt library, and there has never been any Qt versions auto-detected by Qt Creator. However, when I had qmake.exe on my computer, I still wasn't able to compile because it complained about not being able to find uic.exe.

So, should I be able to compile after having installed Qt Creator only? In that case, where do I find qmake.exe or how can I fix that build issue? If I shouldn't be able to compile, what do I need to install more in order to be able to do that? I know that it will work if I just install Qt SDK, but it takes up so much space on the computer, and I'm kind of running out of hard disc space. A friend of mine said he had installed only Qt Creator and it worked for him, that's why I think it's strange that it doesn't work for me. Thanks in advance.

Santosh Reddy
13th November 2011, 05:28
If you are looking to compile a program using Qt libraries, then you should have Qt library installed (Download (http://qt.nokia.com/downloads) one and install).

Yes
13th November 2011, 12:41
There are two versions for Windows, one VS2008 version and one minGW version, which one should I install? I do have Visual Studio 2010 on my computer but that's just a coincidence, I'm not gonna use it since I'm gonna use Qt Creator.

grin
13th November 2011, 14:14
For working in Qt Creator you need minGW version (VS2008 version for working with qt sdk through visual studio).

Yes
13th November 2011, 20:09
Ok, I will install the minGW version of Qt library then. Will I have to configure and make it, and in that case what options can I use if I want to reduce the size of the final folder as much as possible? Or should it be fine if I just install it?

By the way, is it possible to have both Qt library minGW and Qt library VS2008 installed at the same time in the same directory, or is that not to recommend?

grin
13th November 2011, 20:49
I have both version installed - all works fine =).
About install optimization for smaller size final folder - I don't know - I installed as it (next->next-next =) )

Yes
13th November 2011, 21:22
So, I have just downloaded Qt library minGW and I'm currently installing it. It needed to have a path to a MinGW installation, so I downloaded and installed MinGW to be able to continue. I also added the bin folder to the PATH variable. However, when I continue the installation of Qt library I get a message box saying


There is a problem with your MinGW installation:
The installer could not find a valid
C:\MinGW\include\w32api.h
(Only versions with W32API3.13 are supported)
Do you still want to continue? (Your installation may not work)


I checked my MinGW installation; there is indeed a w32api.h file in the include folder, but the version is 3.17. How comes this version is not supported? I do not want to look for an older version of MinGW just to get the proper version of this file.

Edit: I googled the message and found this mail conversation (http://lists.trolltech.com/qt-interest/2008-02/thread00432-0.html). Apparently, the Qt installer tries to match w32api.h against one version only, not that version or newer. And my conclusion is that although only W32API3.13 is tested with this version of Qt, newer versions will probably also work fine.


I have both version installed - all works fine =).
About install optimization for smaller size final folder - I don't know - I installed as it (next->next-next =) )

Okay, seems nice! :)

Added after 18 minutes:

After selecting the qmake.exe that is in the bin folder of Qt library (minGW) in the Qt version option in Qt Creator, I can finally compile and run my program. Thanks!

d_stranz
6th December 2019, 17:40
Be aware that there is no restriction on using the Microsoft C++ toolchain within Qt Creator - you do not have to use minGW and the gcc compilers. You need to configure Qt Creator to use the appropriate toolchain kit when you build. I have toolchains installed for several versions of VC++ (2008, 2012, and 2015) as well as minGW/gcc and two Android cross-compilers. I simply choose the kit I want to use when building a particular project.

You also have the ability to switch among multiple Qt distributions as well.

The same is true for Visual Studio - I can choose which Qt distribution I use when building a project.