I am trying to transfer my project from one computer on qt4 to another, where I just installed qt5 , and I had a very strange problem.
qmake suddenly cannot find any of my source or header files.
Here is a minimalist example:
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = untitled TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp INCLUDEPATH += $$PWD/Dir/ DEPENDPATH += $$PWD/Dir/ HEADERS += mainwindow.h \ fh \ FORMS += mainwindow.ui
Where Dir/fh exists in the same directory as untitled.pro . And I get this output from qmake:
05:18:45: Starting: "/opt/QtSDK/5.0.2/gcc/bin/qmake" /home/martin/Projects/untitled/untitled.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug WARNING: Failure to find: fh 05:18:45: The process "/opt/QtSDK/5.0.2/gcc/bin/qmake" exited normally.
I absolutely do not know what causes this. What could be the problem?
EDIT:
When I manually add the name like this:
HEADERS += Dir/fh \
qmake does not complain.
source share