| Summary: | MinGW compile error SDL_windowssensor.c | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Martin Gerhardy <martin.gerhardy> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Windows (All) | ||
|
Description
Martin Gerhardy
2020-05-06 09:56:48 UTC
The same is true for the other two windows headers that are following. Should all be lowercase. sdl2/src/sensor/windows/SDL_windowssensor.c:39:13: error: redefinition of 'CLSID_SensorManager'
39 | DEFINE_GUID(CLSID_SensorManager, 0x77A1C827, 0xFCD2, 0x4689, 0x89, 0x15, 0x9D, 0x61, 0x3C, 0xC5, 0xFA, 0x3E);
| ^~~~~~~~~~~~~~~~~~~
/usr/src/mxe/usr/x86_64-w64-mingw32.static/include/sensorsapi.h:1221:1: note: previous definition of 'CLSID_SensorManager' was here
1221 | DEFINE_GUID(CLSID_SensorManager, 0x77a1c827, 0xfcd2, 0x4689, 0x89,0x15, 0x9d,0x61,0x3c,0xc5,0xfa,0x3e);
| ^~~~~~~~~~~
sdl2/src/sensor/windows/SDL_windowssensor.c: In function 'SDL_WINDOWS_SensorInit':
sdl2/src/sensor/windows/SDL_windowssensor.c:354:97: warning: passing argument 5 of 'CoCreateInstance' from incompatible pointer type [-Wincompatible-pointer-types]
354 | hr = CoCreateInstance(&CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &IID_SensorManager, &SDL_sensor_manager);
| ^~~~~~~~~~~~~~~~~~~
| |
| ISensorManager ** {aka struct ISensorManager **}
In file included from /usr/src/mxe/usr/x86_64-w64-mingw32.static/include/objbase.h:14,
from /usr/src/mxe/usr/x86_64-w64-mingw32.static/include/ole2.h:17,
from /usr/src/mxe/usr/x86_64-w64-mingw32.static/include/sensorsapi.h:12,
from sdl2/src/sensor/windows/SDL_windowssensor.c:36:
/usr/src/mxe/usr/x86_64-w64-mingw32.static/include/combaseapi.h:256:108: note: expected 'void **' but argument is of type 'ISensorManager **' {aka 'struct ISensorManager **'}
256 | WINOLEAPI CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv);
| ~~~~~~~~^~~
Built via https://github.com/dockcross/dockcross docker run --rm dockcross/windows-static-x64:latest > ./dockcross chmod +x ./dockcross mv ./dockcross ~/bin dockcross cmake .... Most of the issues where already fixed by Ryan, only the lowercase header files are left. diff --git a/contrib/libs/sdl2/src/sensor/windows/SDL_windowssensor.c b/contrib/libs/sdl2/src/sensor/windows/SDL_windowssensor.c index f28b63518..efb7e3fcf 100644 --- a/contrib/libs/sdl2/src/sensor/windows/SDL_windowssensor.c +++ b/contrib/libs/sdl2/src/sensor/windows/SDL_windowssensor.c @@ -32,9 +32,9 @@ #include "../../core/windows/SDL_windows.h" #define COBJMACROS -#include <InitGuid.h> -#include <SensorsApi.h> -#include <Sensors.h> +#include <initguid.h> +#include <sensorsapi.h> +#include <sensors.h> Fixed, thanks! https://hg.libsdl.org/SDL/rev/b622185b81ce |