| Summary: | Failed to build WinMM on MinGW+msys on Windows 7 (3d7cae208a0c) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vitaly Novichkov <admin> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | admin, superfury |
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Windows (All) | ||
| Attachments: | Workaround for the missing structures on the MinGW (non-w64) | ||
My temporary workaround:
Just added manually declaration of missed structures after #include <mmsystem.h> (which are presented with MinGW-w64 but not in MinGW)
====================================================================
typedef struct tagWAVEINCAPS2W {
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
WCHAR szPname[MAXPNAMELEN];
DWORD dwFormats;
WORD wChannels;
WORD wReserved1;
GUID ManufacturerGuid;
GUID ProductGuid;
GUID NameGuid;
} WAVEINCAPS2W,*PWAVEINCAPS2W,*NPWAVEINCAPS2W,*LPWAVEINCAPS2W;
typedef struct tagWAVEOUTCAPS2W {
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
WCHAR szPname[MAXPNAMELEN];
DWORD dwFormats;
WORD wChannels;
WORD wReserved1;
DWORD dwSupport;
GUID ManufacturerGuid;
GUID ProductGuid;
GUID NameGuid;
} WAVEOUTCAPS2W,*PWAVEOUTCAPS2W,*NPWAVEOUTCAPS2W,*LPWAVEOUTCAPS2W;
====================================================================
Created attachment 2675 [details]
Workaround for the missing structures on the MinGW (non-w64)
This workaround adds missing declarations for the WAVEOUTCAPS2W and WAVEINCAPS2W structures in the headers of the non-w64 MinGW (until there are will fix them in next versions).
About https://hg.libsdl.org/SDL/rev/7e06b0e4dbe0: Huh? I wasn't hoped you will really accept this because of the fact of workaround... But okay, I'll try to build it now Okay, seems this is no more problem. Still need to wait until MinGW folks will fix their bug (I think, it's time to report them about that) (In reply to Vitaly Novichkov from comment #4) > Okay, seems this is no more problem. Still need to wait until MinGW folks > will fix their bug (I think, it's time to report them about that) Yes, please do ask them to update their headers, but I think we're good here for now, so resolving this bug. --ryan. |
When I tried to build latest SDL package since a5667285680d, it failed on SDL_winmm.c and can't find WAVEOUTCAPS2W structure. ====================================================================== src/audio/winmm/SDL_winmm.c: In function 'DetectWaveOutDevs': src/audio/winmm/SDL_winmm.c:57:33: error: unknown type name 'WAVEOUTCAPS2W' DETECT_DEV_IMPL(SDL_FALSE, Out, WAVEOUTCAPS) ^ src/audio/winmm/SDL_winmm.c:44:5: note: in definition of macro 'DETECT_DEV_IMPL' capstyp##2W caps; \ ^ src/audio/winmm/SDL_winmm.c:48:56: error: request for member 'szPname' in someth ing not a structure or union char *name = WIN_LookupAudioDeviceName(caps.szPname,&caps.NameGuid) ; \ ^ src/audio/winmm/SDL_winmm.c:57:1: note: in expansion of macro 'DETECT_DEV_IMPL' DETECT_DEV_IMPL(SDL_FALSE, Out, WAVEOUTCAPS) ^ src/audio/winmm/SDL_winmm.c:48:70: error: request for member 'NameGuid' in somet hing not a structure or union char *name = WIN_LookupAudioDeviceName(caps.szPname,&caps.NameGuid) ; \ ^ src/audio/winmm/SDL_winmm.c:57:1: note: in expansion of macro 'DETECT_DEV_IMPL' DETECT_DEV_IMPL(SDL_FALSE, Out, WAVEOUTCAPS) ^ src/audio/winmm/SDL_winmm.c: In function 'DetectWaveInDevs': src/audio/winmm/SDL_winmm.c:58:31: error: unknown type name 'WAVEINCAPS2W' DETECT_DEV_IMPL(SDL_TRUE, In, WAVEINCAPS) ^ src/audio/winmm/SDL_winmm.c:44:5: note: in definition of macro 'DETECT_DEV_IMPL' capstyp##2W caps; \ ^ src/audio/winmm/SDL_winmm.c:48:56: error: request for member 'szPname' in someth ing not a structure or union char *name = WIN_LookupAudioDeviceName(caps.szPname,&caps.NameGuid) ; \ ^ src/audio/winmm/SDL_winmm.c:58:1: note: in expansion of macro 'DETECT_DEV_IMPL' DETECT_DEV_IMPL(SDL_TRUE, In, WAVEINCAPS) ^ src/audio/winmm/SDL_winmm.c:48:70: error: request for member 'NameGuid' in somet hing not a structure or union char *name = WIN_LookupAudioDeviceName(caps.szPname,&caps.NameGuid) ; \ ^ src/audio/winmm/SDL_winmm.c:58:1: note: in expansion of macro 'DETECT_DEV_IMPL' DETECT_DEV_IMPL(SDL_TRUE, In, WAVEINCAPS) ^ make: *** [build/SDL_winmm.lo] Error 1 ======================================================================