I get errors when compiling if I include the SDL.h header. The errors are as
follows.
//Begin Errors
1 d:\Dev-Cpp\include\SDL\SDL.h:39,from main.cpp In file included
from d:/Dev-Cpp/include/SDL/SDL.h:39,from main.cpp
1 D:\Dev-Cpp\Projects\SDLExample\main.cpp, from main.cpp
97 d:\Dev-Cpp\include\SDL\SDL_audio.h syntax error before `[’ token
5 D:\Dev-Cpp\Projects\SDLExample\main.cpp syntax error before `(’ token
2 D:\Dev-Cpp\Projects\SDLExample\main.cpp:8 [Warning] no newline at end of file
D:\Dev-Cpp\Projects\SDLExample\Makefile.win [Build Error] [main.o] Error 1
//End Errors
The compiler is claiming this stems from this
line of code in the file SDL_audio.h
void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
Does anyone know what causes this?
This has already been discussed 
You just have to delete the SDLCALL in the function declaration and it
should work.
Regards.
Aurelien Vandoorine
Joe Seeley wrote:>I get errors when compiling if I include the SDL.h header. The errors are as
follows.
//Begin Errors
1 d:\Dev-Cpp\include\SDL\SDL.h:39,from main.cpp In file included
from d:/Dev-Cpp/include/SDL/SDL.h:39,from main.cpp
1 D:\Dev-Cpp\Projects\SDLExample\main.cpp, from main.cpp
97 d:\Dev-Cpp\include\SDL\SDL_audio.h syntax error before `[’ token
5 D:\Dev-Cpp\Projects\SDLExample\main.cpp syntax error before `(’ token
2 D:\Dev-Cpp\Projects\SDLExample\main.cpp:8 [Warning] no newline at end of file
D:\Dev-Cpp\Projects\SDLExample\Makefile.win [Build Error] [main.o] Error 1
//End Errors
The compiler is claiming this stems from this
line of code in the file SDL_audio.h
void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
Does anyone know what causes this?
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl