I also got this error after modifying the qtsingleapplication.cpp file.

mingw32-make thought the file QtSingleApplication was a binary compiled from qtsingleapplication.cpp and, because the .cpp file was newer than the "binary", make used its implicit rules to recompile the "binary" from source. Hence the lack of include flags in the compilation command and the inaccessible header files.

Solved it with a "touch QtSingleApplication".