rochus-keller/LeanCreator

Build error on MSYS2 UCRT64

Opened this issue · 3 comments

C:/msys64/home/Administrator/LeanQt/core/qfilesystemengine_win.cpp:622:16: error: redefinition of 'struct _FILE_ID_INFO'
  622 | typedef struct _FILE_ID_INFO {
      |                ^~~~~~~~~~~~~
In file included from C:/msys64/ucrt64/include/windows.h:70,
                 from C:/msys64/home/Administrator/LeanQt/core/qt_windows.h:55,
                 from C:/msys64/home/Administrator/LeanQt/includes/QtCore/qt_windows.h:1,
                 from C:/msys64/home/Administrator/LeanQt/core/qfilesystemmetadata_p.h:55,
                 from C:/msys64/home/Administrator/LeanQt/core/qfilesystemengine_p.h:50,
                 from C:/msys64/home/Administrator/LeanQt/core/qfilesystemengine_win.cpp:26:
C:/msys64/ucrt64/include/winbase.h:3252:18: note: previous definition of 'struct _FILE_ID_INFO'
 3252 |   typedef struct _FILE_ID_INFO {
      |                  ^~~~~~~~~~~~~
C:/msys64/home/Administrator/LeanQt/core/qfilesystemengine_win.cpp:625:3: error: conflicting declaration 'typedef int FILE_ID_INFO'
  625 | } FILE_ID_INFO, *PFILE_ID_INFO;
      |   ^~~~~~~~~~~~
C:/msys64/ucrt64/include/winbase.h:3255:5: note: previous declaration as 'typedef struct _FILE_ID_INFO FILE_ID_INFO'
 3255 |   } FILE_ID_INFO,*PFILE_ID_INFO;
      |     ^~~~~~~~~~~~
C:/msys64/home/Administrator/LeanQt/core/qfilesystemengine_win.cpp:625:18: error: conflicting declaration 'typedef int* PFILE_ID_INFO'
  625 | } FILE_ID_INFO, *PFILE_ID_INFO;
      |                  ^~~~~~~~~~~~~
C:/msys64/ucrt64/include/winbase.h:3255:19: note: previous declaration as 'typedef struct _FILE_ID_INFO* PFILE_ID_INFO'
 3255 |   } FILE_ID_INFO,*PFILE_ID_INFO;

Aparently there are issues with their version of the Windows headers. Maybe additional defines are required to successfully build with your version of MinGW; or just use the same version I used: https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/i686-12.2.0-release-win32-dwarf-msvcrt-rt_v10-rev2.7z which works fine.

Aparently there are issues with their version of the Windows headers. Maybe additional defines are required to successfully build with your version of MinGW; or just use the same version I used: https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/i686-12.2.0-release-win32-dwarf-msvcrt-rt_v10-rev2.7z which works fine.

This bug was resolved on upstream Qt: https://bugreports.qt.io/browse/QTBUG-94031

I don't know if you could apply the patch to LeanQt, though.

I will have a look at it, thanks for the hint; or just try yourself to directly modify the qfilesystemengine_win.cpp file included with LeanQt.