November 7th, 2011
If you build a SDL OpenGL application for Mac OS X using SDL 1.2.14 (using the binary installer at the SDL site) and the Mac OS X 10.7 SDK, you can get the following error:
typedef redefinition with different types ('unsigned int' vs 'void *')
The SDL header file SDL_opengl.h and the OpenGL header file glext.h both define a data type GLhandleARB. SDL_opengl.h defines it as an unsigned integer. The Mac OS X 10.7 version of glext.h defines it as a void pointer. Defining GLhandleARB as different data types in different header files causes problems.
The SDL team fixed the problem in their Mercurial repository. The fix is not too difficult to apply. In your SDL_opengl.h file, change the following line of code:
typedef unsigned int GLhandleARB;
To the following:
#if defined(__APPLE__) typedef void *GLhandleARB; #else typedef unsigned int GLhandleARB; #endif
The fix defines GLhandleARB as a void pointer on Mac OS X and an unsigned integer on other operating systems.