Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator source build failed: psapi.h problem
Forum Updated to NodeBB v4.3 + New Features

QtCreator source build failed: psapi.h problem

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 3 Posters 231 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Grit ClefG Offline
    Grit ClefG Offline
    Grit Clef
    wrote on last edited by Grit Clef
    #1

    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?

    1 Reply Last reply
    0
    • aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • Grit ClefG Offline
        Grit ClefG Offline
        Grit Clef
        wrote on last edited by Grit Clef
        #3

        I just don't want to use Qt6, that's it. I tried to manually expand the macro CALLBACK to __stdcall in psapi.h, and those errors disappeared... Now I'm wondering this...

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What has QtCreator to do with the Qt version you want to use for compiling? It's just an IDE...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1
          • Grit ClefG Grit Clef has marked this topic as solved on

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved