我有一个 .pro 文件:
INCLUDEPATH += $$PWD/../somefolder/ \
DEPENDPATH += $$PWD/../somefolder/ \
SOURCES += some_file.cpp \
我得到一个错误:
:-1: error: No rule to make target `some_file.cpp',
needed by `some_file.h'. Stop.
但是当我手动添加文件名时:
SOURCES += $$PWD/../somefolder/some_file.cpp \
找到该文件。
我查看了类似的 .pro 文件,发现这些文件不需要手动添加路径名。什么可能导致这种行为?