Seems strange. You set QMAKESPEC to C:\qt-4.8.6-x64-mingw-sjlj\mkspecs\win32-g++ but the include files were in a totally different subtree of C (C:\Qt\4.8.6\...) ? Seems someone.... extraordinary.