I have a .pro file:
INCLUDEPATH += $$PWD/../somefolder/ \
DEPENDPATH += $$PWD/../somefolder/ \
SOURCES += some_file.cpp \
And I get an error:
:-1: error: No rule to make target `some_file.cpp',
needed by `some_file.h'. Stop.
But when I manually prepend the file name:
SOURCES += $$PWD/../somefolder/some_file.cpp \
The file is found.
I looked on similar .pro files and I see that the files do not need to be prepended with path names manually. What could cause this behavior?
You have extra \
in the end of previous line. So DEPENDPATH
line is expected to be part of previous directive. It's equivalent to:
INCLUDEPATH += $$PWD/../somefolder/ DEPENDPATH += $$PWD/../somefolder/
which obviously doesn't make any sense. Remove ending \
from both lines.