Problem compiling for mingw using cygwin g++

I was playing with SDL 1.2.8 on my cygwin box, trying to build for mingw
targets (no cygwin dll) and ran into a problem.

I kept getting this this from g++:

In file included from /opt/sdl/SDL-1.2.8/include/SDL/SDL.h:39,
from main.cpp:4:
/opt/sdl/SDL-1.2.8/include/SDL/SDL_audio.h:97: error: parse error
before `[’ token

The declaration there is pretty convoluted. So I split it up. Patch attached.

Sorry if this is a known/solved problem. I didn’t see it mentioned on the list
(but I didn’t look very hard either)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: patch.txt
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050513/050a7877/attachment.txt

The declaration there is pretty convoluted. So I split it up. Patch attached.

Sorry if this is a known/solved problem. I didn’t see it mentioned on the list
(but I didn’t look very hard either)
83a84

struct SDL_AudioCVT;
84a86
typedef void (SDLCALL *filt_func)(struct SDL_AudioCVT *cvt, Uint16 format);
97c99
< void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);


filt_func filters[10];

It was rather frequent question here on this list :slight_smile: IIRC there’s bug in g++ which is caused by SDLCALL - just remove it from there and it should work fine.

Koshmaar