Building SDL.framework on OS X

Hi guys! I’m new to SDL and I’m trying to build SDL2 framework for OS
X. I’ve cloned hg repo opened Xcode project located in ./Xcode folder and
clicked Product -> Build in Framework | My Mac 64-bit configuration.
I’ve got an error:

…/SDL2/src/video/x11/SDL_x11xinput2.h:30:36: Typedef redefinition with
different types (‘struct XGenericEventCookie’ vs ‘struct
XGenericEventCookie’ (aka ‘XGenericEventCookie’))

Could someone help me with this issue? I’m running OS X 10.7.4 and Xcode
4.5. Building with Apple LLVM compiler 4.1. Btw I looking for good tutorial
how to build a Cocoa SDL 2.0 application which would not rely on X11. Are
there any?
Thanks for help.

Regards, Alexey.

You can edit include/SDL_config_macosx.h and delete any line that has X11
and GLX in it. :)On Thu, Sep 20, 2012 at 4:14 AM, Alexey Petruchik wrote:

Hi guys! I’m new to SDL and I’m trying to build SDL2 framework for OS
X. I’ve cloned hg repo opened Xcode project located in ./Xcode folder and
clicked Product -> Build in Framework | My Mac 64-bit configuration.
I’ve got an error:

…/SDL2/src/video/x11/SDL_x11xinput2.h:30:36: Typedef redefinition with
different types (‘struct XGenericEventCookie’ vs ‘struct
XGenericEventCookie’ (aka ‘XGenericEventCookie’))

Could someone help me with this issue? I’m running OS X 10.7.4 and Xcode
4.5. Building with Apple LLVM compiler 4.1. Btw I looking for good tutorial
how to build a Cocoa SDL 2.0 application which would not rely on X11. Are
there any?
Thanks for help.

Regards, Alexey.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I need to comment out specifically

#define SDL_VIDEO_DRIVER_X11 1
#define SDL_VIDEO_DRIVER_X11_DYNAMIC “/usr/X11R6/lib/libX11.6.dylib”
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT “/usr/X11R6/lib/libXext.6.dylib”

from SDL_config_macosx.h and compiling works.