Incorrect Makefile generated
Hello,
I'm on Windows using the new Beta Qt SDK (Qt 4.7.2), with MinGW.
I tried creating a new GUI Application on creator (with a .ui file).
I modified a little bit the .pro file, putting :
Code:
CONFIG -= warn_on warn_off release debug debug_and_release
CONFIG *= qt warn_on release
when compiling, I get :
process_begin: CreateProcess(NULL, c:\Qt\Desktop\Qt\4.7.2\mingw\binuic.exe ..\qmaketest\mainwindow.ui -o ui_mainwindow.h, ...) failed.
As you can see, make is trying to invoke the incorrect uic binary (binuic.exe instead of bin\uic.exe). I fixed this issue by removing debug_and_release from the first line.
However, I can't figure out why qmake is generating an incorrect makefile (the DIR_SEPARAOR seems to be empty). I also tried with Qt 4.7.0, same issue.
It is working fine on Linux & Mac. QMake Windows bug I guess ?
Re: Incorrect Makefile generated
You could have a look inside the QTDIR/mkspecs directory to see if the separator is set up correctly.
Re: Incorrect Makefile generated
I already did.
However, it's working when removing debug_and_release from
That's why I'm wondering if it's a qmake bug or ... (since it's woking on Linux & Mac OS).
Re: Incorrect Makefile generated
Can we see the whole project file?
Re: Incorrect Makefile generated
sure, really simple :
Code:
QT += core gui
TARGET = qmaketest
TEMPLATE = app
CONFIG -= debug_and_release
CONFIG *= qt warn_on release
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
just a basic .pro generated by Qt Creator in which I added the two CONFIG lines. Removing or commenting the first CONFIG line makes the application compile. Otherwise, I get :
Quote:
process_begin: CreateProcess(NULL, c:\Qt\Desktop\Qt\4.7.2\mingw\binuic.exe ..\qmaketest\mainwindow.ui -o ui_mainwindow.h, ...) failed.
where a '\' is missing. I really don't get it :/
Re: Incorrect Makefile generated
What if you change the relevant two lines to:
Re: Incorrect Makefile generated
It is indeed working, but now if you try :
Code:
CONFIG += release
CONFIG(debug, debug|release) {
message("Debug")
} else {
message("Release")
}
You'll get "Release" 3 times.
Anyway, thank you for your help, I think it's a bug on qmake. I'll report it :)
Re: Incorrect Makefile generated
Quote:
Originally Posted by
Octal
You'll get "Release" 3 times.
On Windows you always get such messages three times. What's relevant is that the "release" part of the project file is the active one.