Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.0.0
Description
For simple projects it used to be possible to build direct from source like this
qmake -project qmake -makefile make
In Qt5 this got broken and its now necessary to had edit the .pro files after the first step.
Using the Nokia hello world QT example (attached), the following occurs:
jeremy@blackbox ~/src/qt_bugs/qmake-qt-var $ ~/src/qt-everywhere-opensource-src-5.0.0/qtbase/bin/qmake -project jeremy@blackbox ~/src/qt_bugs/qmake-qt-var $ ~/src/qt-everywhere-opensource-src-5.0.0/qtbase/bin/qmake -makefile jeremy@blackbox ~/src/qt_bugs/qmake-qt-var $ make g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../qt-everywhere-opensource-src-5.0.0/qtbase/mkspecs/linux-g++-64 -I. -I. -I../../qt-everywhere-opensource-src-5.0.0/qtbase/include -I../../qt-everywhere-opensource-src-5.0.0/qtbase/include/QtGui -I../../qt-everywhere-opensource-src-5.0.0/qtbase/include/QtCore -I. -o main.o main.cpp main.cpp:1:24: fatal error: QApplication: No such file or directory compilation terminated. make: *** [main.o] Error 1
I can build code by hand editing the .pro file after qmake created it and adding a line
QT += widgets
However this is a regression. If qmake -makefile now needs that line for even the most simple cases, qmake -project should write it in.