QtCreator source build failed: psapi.h problem
-
Hi all,
I'm not very familiar to the overall process of building QtCreator. Today I tried building QtCreator 7.0.2 from source on Windows in MSYS2 environment. I installed all packages about Qt 5.15.16 and GCC 14.2.0, then I successfully cmaked the source. Everything has been well until the 'localprocesslist.cpp' was built. The error is:In file included from localprocesslist.cpp:45: D:/msys64/mingw32/include/psapi.h:166:28: error: expected ')' before '*' token 166 | typedef WINBOOL (CALLBACK *PENUM_PAGE_FILE_CALLBACKW) (LPVOID pContext,PENUM_PAGE_FILE_INFORMATION pPageFileInfo,LPCWSTR lpFilename); | ~ ^~ | ) D:/msys64/mingw32/include/psapi.h:167:28: error: expected ')' before '*' token 167 | typedef WINBOOL (CALLBACK *PENUM_PAGE_FILE_CALLBACKA) (LPVOID pContext,PENUM_PAGE_FILE_INFORMATION pPageFileInfo,LPCSTR lpFilename); | ~ ^~ | ) D:/msys64/mingw32/include/psapi.h:169:34: error: 'PENUM_PAGE_FILE_CALLBACKW' was not declared in this scope; did you mean 'PENUM_PAGE_FILE_CALLBACK'? 169 | WINBOOL WINAPI EnumPageFilesW (PENUM_PAGE_FILE_CALLBACKW pCallBackRoutine,LPVOID pContext); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | PENUM_PAGE_FILE_CALLBACK D:/msys64/mingw32/include/psapi.h:169:84: error: expected primary-expression before 'pContext' 169 | WINBOOL WINAPI EnumPageFilesW (PENUM_PAGE_FILE_CALLBACKW pCallBackRoutine,LPVOID pContext); | ^~~~~~~~ ............
Such errors were caused by the psapi.h. But I haven't modified it, which belongs to the compiler itself. How to solve that problem? Great thanks.
Or is there some way to exclude the 'projectexporter' plugin from build?
-
@Grit-Clef Any reason you want to build an almost three year old Creator version with a very recent GCC compiler?
I'd recommend trying Qt Creator 15 or the upcoming 16 instead, which will need some newer Qt 6 also.
And ProjectExplorer is one of the essential plugins, you will not get far without that.
Regards
-
What has QtCreator to do with the Qt version you want to use for compiling? It's just an IDE...
-
G Grit Clef has marked this topic as solved