Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_windows_gaming_input.c fails compiling in MSYS2/MinGW and GCC 12.1 for Win32 #5728

Closed
LigH-de opened this issue May 27, 2022 · 2 comments
Milestone

Comments

@LigH-de
Copy link

LigH-de commented May 27, 2022

Compiling SDL in media-autobuild_suite recently fails. Excerpt frrom build log:

CPPFLAGS: -D_FORTIFY_SOURCE=0 -D__USE_MINGW_ANSI_STDIO=1
CFLAGS: -mthreads -mtune=generic -O2 -pipe
CXXFLAGS: -mthreads -mtune=generic -O2 -pipe
LDFLAGS: -pipe -static-libgcc -static-libstdc++
make -j4 

...

../src/joystick/windows/SDL_windows_gaming_input.c: In function 'WGI_JoystickOpen':
../src/joystick/windows/SDL_windows_gaming_input.c:657:13: error: unknown type name '__FIReference_1_int'; did you mean '__FIReference_1_INT32'?
  657 |             __FIReference_1_int *full_capacityP, *curr_capacityP;
      |             ^~~~~~~~~~~~~~~~~~~
      |             __FIReference_1_INT32
In file included from G:/MABS/msys64/mingw32/include/windows.gaming.input.h:622,
                 from ../src/joystick/windows/SDL_windows_gaming_input.c:33:
../src/joystick/windows/SDL_windows_gaming_input.c:659:114: warning: passing argument 2 of 'report->lpVtbl->get_FullChargeCapacityInMilliwattHours' from incompatible pointer type [-Wincompatible-pointer-types]
  659 |             hr = __x_ABI_CWindows_CDevices_CPower_CIBatteryReport_get_FullChargeCapacityInMilliwattHours(report, &full_capacityP);
      |                                                                                                                  ^~~~~~~~~~~~~~~
      |                                                                                                                  |
      |                                                                                                                  int **
../src/joystick/windows/SDL_windows_gaming_input.c:659:114: note: expected '__FIReference_1_INT32 **' but argument is of type 'int **'
../src/joystick/windows/SDL_windows_gaming_input.c:661:17: warning: implicit declaration of function '__FIReference_1_int_get_Value' [-Wimplicit-function-declaration]
  661 |                 __FIReference_1_int_get_Value(full_capacityP, &full_capacity);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/joystick/windows/SDL_windows_gaming_input.c:662:17: warning: implicit declaration of function '__FIReference_1_int_Release' [-Wimplicit-function-declaration]
  662 |                 __FIReference_1_int_Release(full_capacityP);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/joystick/windows/SDL_windows_gaming_input.c:665:113: warning: passing argument 2 of 'report->lpVtbl->get_RemainingCapacityInMilliwattHours' from incompatible pointer type [-Wincompatible-pointer-types]
  665 |             hr = __x_ABI_CWindows_CDevices_CPower_CIBatteryReport_get_RemainingCapacityInMilliwattHours(report, &curr_capacityP);
      |                                                                                                                 ^~~~~~~~~~~~~~~
      |                                                                                                                 |
      |                                                                                                                 int **
../src/joystick/windows/SDL_windows_gaming_input.c:665:113: note: expected '__FIReference_1_INT32 **' but argument is of type 'int **'
make: *** [Makefile:730: build/SDL_windows_gaming_input.lo] Error 1
make: *** Waiting for unfinished jobs....
/bin/sh ../build-scripts//updaterev.sh
  CC     build/SDL.lo
  CC     build/SDL_windows_gaming_input.lo
../src/joystick/windows/SDL_windows_gaming_input.c: In function 'WGI_JoystickOpen':
../src/joystick/windows/SDL_windows_gaming_input.c:657:13: error: unknown type name '__FIReference_1_int'; did you mean '__FIReference_1_INT32'?
  657 |             __FIReference_1_int *full_capacityP, *curr_capacityP;
      |             ^~~~~~~~~~~~~~~~~~~
      |             __FIReference_1_INT32
In file included from G:/MABS/msys64/mingw32/include/windows.gaming.input.h:622,
                 from ../src/joystick/windows/SDL_windows_gaming_input.c:33:
../src/joystick/windows/SDL_windows_gaming_input.c:659:114: warning: passing argument 2 of 'report->lpVtbl->get_FullChargeCapacityInMilliwattHours' from incompatible pointer type [-Wincompatible-pointer-types]
  659 |             hr = __x_ABI_CWindows_CDevices_CPower_CIBatteryReport_get_FullChargeCapacityInMilliwattHours(report, &full_capacityP);
      |                                                                                                                  ^~~~~~~~~~~~~~~
      |                                                                                                                  |
      |                                                                                                                  int **
../src/joystick/windows/SDL_windows_gaming_input.c:659:114: note: expected '__FIReference_1_INT32 **' but argument is of type 'int **'
../src/joystick/windows/SDL_windows_gaming_input.c:661:17: warning: implicit declaration of function '__FIReference_1_int_get_Value' [-Wimplicit-function-declaration]
  661 |                 __FIReference_1_int_get_Value(full_capacityP, &full_capacity);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/joystick/windows/SDL_windows_gaming_input.c:662:17: warning: implicit declaration of function '__FIReference_1_int_Release' [-Wimplicit-function-declaration]
  662 |                 __FIReference_1_int_Release(full_capacityP);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/joystick/windows/SDL_windows_gaming_input.c:665:113: warning: passing argument 2 of 'report->lpVtbl->get_RemainingCapacityInMilliwattHours' from incompatible pointer type [-Wincompatible-pointer-types]
  665 |             hr = __x_ABI_CWindows_CDevices_CPower_CIBatteryReport_get_RemainingCapacityInMilliwattHours(report, &curr_capacityP);
      |                                                                                                                 ^~~~~~~~~~~~~~~
      |                                                                                                                 |
      |                                                                                                                 int **
../src/joystick/windows/SDL_windows_gaming_input.c:665:113: note: expected '__FIReference_1_INT32 **' but argument is of type 'int **'
make: *** [Makefile:730: build/SDL_windows_gaming_input.lo] Error 1

logs.zip gathered by media-autobuild_suite

@LigH-de LigH-de changed the title SDL_windows_gaming_input.c fails compiling in MSYS2/MinGW and GCC 12.1 SDL_windows_gaming_input.c fails compiling in MSYS2/MinGW and GCC 12.1 for Win32 May 27, 2022
@slouken slouken added this to the 2.24.0 milestone May 27, 2022
@sezero
Copy link
Contributor

sezero commented May 27, 2022

This is a dup of #5589

@LigH-de
Copy link
Author

LigH-de commented May 27, 2022

Thanks, forwarding this to let MABS authors know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants