andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
526 stars 49 forks source link

MSYS2 mingw compilation failure #323

Closed andrey-budko closed 2 months ago

andrey-budko commented 2 months ago
Compiling sys_sdl_win.c
sys_sdl_win.c: In function 'Sys_Explore':
sys_sdl_win.c:560:53: error: passing argument 3 of 'SHOpenFolderAndSelectItems' from incompatible pointer type [-Wincompatible-pointer-types]
  560 |         hr = SHOpenFolderAndSelectItems (folder, 1, &file, 0);
      |                                                     ^~~~~
      |                                                     |
      |                                                     ITEMIDLIST **
In file included from sys_sdl_win.c:41:
D:/tools/prg/msys64/mingw64/include/shlobj.h:631:103: note: expected 'const ITEMIDLIST **' but argument is of type 'ITEMIDLIST **'
  631 |   SHSTDAPI SHOpenFolderAndSelectItems (PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD dwFlags);
      |                                                                                                       ^
make: *** [Makefile.w64:296: sys_sdl_win.o] Error 1
andrei-drexler commented 2 months ago

Thanks, should be fixed after https://github.com/andrei-drexler/ironwail/commit/e4b2af9fabcba26543925f16c31670c1bae0aeae. I don't typically build using MinGW (for one, it's significantly slower than MSVC), so I've added CI as well (from QS) to catch this in the future.