qt中移动代码文件到另外一个文件夹出现如下错误或者警告
warning: overriding recipe for target ‘XXX.o’
warning: ignoring old recipe for target ‘XXX.o’
make: *** No rule to make target ‘XXX.cpp’, needed by ‘XXX.o’. Stop.
参考
https://blog.csdn.net/jiangxiaoyu20/article/details/100552167
发现自己的问题在于把移动后文件添加到项目后,QTCREATOR的 .pro 文件中包含了之前已经移动代码文件路径,把它删除就好了(注意xxx.h和xxx.cpp都要删除)。