Qt 5.1.1 "unsupported makefile generator" error
-
I have built Qt 5.1.1 from the zip file sources using MSVC 2012 and shadow builds for both 64- and 32-bit. After repeatedly trying to "nmake install" and finally reading that it doesn't work properly on Windows, wrote my own batch file scripts to copy the required binary and header files to the directories I will use when building Qt apps.
Using MSVC 2012 and the Qt VS addin version 1.2.2, I cannot get this new version of Qt added to VS. I keep getting the "unsupported makefile generator (used: , supported: MSVC.NET, MSBUILD)" error.
I have read that this is due to an improper qmake.conf file. My file in the qtbase/mkspecs/win32-msvc2012 directory has as the first line
MAKEFILE_GENERATOR = MSBUILD
Either the addin is not looking at this particular file, or there is some other error. I've tried making the registry fix that is posted elsewhere on the net, I've tried making a mkspecs/default directory with this qmake.conf file in it, as well as editing that file to point to win32-msvc2012. Nothing works.
Can anyone please tell me where the addin is looking when trying to determine the makefile generator? Or if this isn't the problem, then what is it?
-
Hi,
AFAIK, it's not possible to move around a Qt build like that, what you could try is to do an out of source build where you would like to have your various Qt versions.
Hope it helps
-
That's what I thought I was doing. I opened a Visual Studio 64-bit command prompt, then I used this configure command in an "x64" directory sitting at the same level as the top of the Qt sources:
..\5_1_1\configure -prefix $PWD -platform win32-msvc2012 -debug-and-release -opensource -opengl desktop -mp -skip webkit -no-dbus -no-strip -qt-zlib -I ..\5_1_1\qtbase\include\QtZlib
This created a .pro / .pri / Makefile hierarchy in x64. I then ran nmake in that directory and it built all the binaries in x64\lib.
Did the same thing for "x32", using a 32-bit command prompt.
Unfortunately, this leaves the situation where all of the header files are in the original source tree, there are no .dll files in the x64\bin or x32\bin directories, and "nmake install" makes a further mess of things.
My goal was to be able to set a QTDIR environment variable to point to a top level directory. Under this would be .\x32, .\x64, .\include directories. But then I found I also needed .\qml and .\src, and it was at that point I discovered I couldn't set the Qt version in Visual Studio.
So I am doing it wrong. Is there documentation anywhere on how shadow builds are supposed to be done?
I have to support OpenGL desktop on 32-bit XP for legacy projects, and new projects will be developed in 64-bit and use QML and QtQuick 2.0. All will use VS 2012. Unfortunately, the available pre-built binary distributions are exactly the reverse - there are 32-bit builds using ANGLE, and 64-bit builds using ANGLE and OpenGL, but no 32-bit OpenGL. The description of ANGLE vs. OpenGL implies ANGLE can result in crashes on XP.
My goal is to have a single set of include / import files, with two different binary build trees, one for 64-bit, one for 32-bit. If I have to set up 3 different environment variables in order to point to each of these, that's fine - I can manage that in project files.
-
Then you could try to use the developer build option
-
I thought "developer build" was used when you were actually working on Qt itself, not developing apps that use Qt?
I will give that a try next time I have a few hours worth of CPU time to burn up.
-
It's the goal indeed, but that doesn't make it unusable for day to day development.
-
This doesn't help you much, but I have noticed that configuring Qt without "shadowing" allows the VS plugin to recognise the QMake (well, it doesn't give this error message, wheras it did do so when I tried to do a shadow build).
This doesn't answer the question, but I'm guessing that the VS plugin is expecting to find something which is normally found in the qtbase directory of the source-code distribution. Maybe this would help ?
-
Somewhere in the installation notes for Qt 5.2, I read that on WIndows, the build prefers being done in-source rather than as a shadow build.
So even though that means having two complete copies of the source tree when I want to build both 32-bit and 64-bit versions, that's what I'm doing.
With the exception of QWebkit and QWinExtras, 5.2 builds in source just fine with VS2008. I think QWinExtras fails because there are header files that come only with later versions of VS. For internal reasons, we're stuck on VS2008 for a while, so I simply exclude those kits form the build.