After installing 10.8 today and doing all of the apple suggested updates to Xcode, I cleaned my Xcode SDL2 project (based off of the testgl2 example project) and it gave me this error:
In SDL_platform.h:75, ‘AvailablityMacros.h’ file not found.
I don’t appear to have that file on my computer.
(I ran my project to build the iOS version and that worked fine.)
I thought perhaps an SDL2 update had been released to fix this issue, so I downloaded the latest today from mercurial. (Turns out I had to reinstall mercurial first.) I tried to run the demo project testgl2. It found one error, which was in SDL_syswm.h:68, ‘X11/Xlib.h’ file not found.
After reinstalling X11, I compiled the SDL2 project, and the old error was gone and there are two new errors:
From SDL_cocoamodes.m:105, Use of undeclared identifer ‘kCGErrorNameTooLong’
From SDL_cocoamodes.m:117, Use of undeclared identifer ‘kCGErrorNoCurrentPoint’
I believe those two used to be defined in CGError.h, but they seem not to be defined in MacOSC10.8>Frameworks>CoreGraphics.framework>CGError.h
Has anyone else encountered issues with SDL2 and 10.8? Should I just compile against 10.7 instead of 10.8, or is there a better fix?
I ran into those same two issues in SDL_cocoamodes.m under 10.8.
(And after “solving” those issues by commenting them out, I received a further error: /Users/trevor/src/SDL2/src/video/x11/SDL_x11sym.h:110:30: Conflicting types for ‘XextAddDisplay’ )
(if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY is defined, it compiles properly. Not sure where that’s supposed to be being set from; don’t see any references in the code or project)
SDL2 does build for me after hacking my way past those three errors.
I tried commenting them out too, and came across the same subsequent error. I decided to stop there since it seems like I was entering the rabbit hole, but if you report that things seem fixed after the last fix, I guess I’ll just try doing that until a proper (i.e., official) fix is released.
Thanks, Trevor 2.
Since upgrading to OSX10.8 / XCode4.4 / SDL-2.0.0-6373, I get the following error when making SDL from the command line:
In file included from src/events/SDL_events.c:27:
./include/SDL_syswm.h:68:22: warning: X11/Xlib.h: No such file or directory
./include/SDL_syswm.h:69:23: warning: X11/Xatom.h: No such file or directory
In file included from src/events/SDL_events.c:27:
./include/SDL_syswm.h:130: error: expected specifier-qualifier-list before ?XEvent?
./include/SDL_syswm.h:176: error: expected specifier-qualifier-list before ?Display?
There’s a newer version of SDL which might include a fix. Failing that, if you use the configure script, you can add the option, “–with-x=no”. Otherwise, a stop-gap is to comment out the following lines from SDL_config.h:
Since upgrading to OSX10.8 / XCode4.4 / SDL-2.0.0-6373, I get the following error when making SDL from the command line:
In file included from src/events/SDL_events.c:27:
./include/SDL_syswm.h:68:22: warning: X11/Xlib.h: No such file or directory
./include/SDL_syswm.h:69:23: warning: X11/Xatom.h: No such file or directory
In file included from src/events/SDL_events.c:27:
./include/SDL_syswm.h:130: error: expected specifier-qualifier-list before ?XEvent?
./include/SDL_syswm.h:176: error: expected specifier-qualifier-list before ?Display?
There’s a newer version of SDL which might include a fix. Failing that, if you use the configure script, you can add the option, “–with-x=no”. Otherwise, a stop-gap is to comment out the following lines from SDL_config.h:
I just got the latest zipped SDL2 and I still get the error at SDL_config_macosx.h:28, where it mentions AvailabilityMacros.h is missing. I’ve just been trying to build the included Xcode projects.
I tried commenting out those 3 lines about SDL_VIDEO_DRIVER_X11 and I get the same error.
It seems like 10.8 removed AvailabilityMacros.h from the SDK, so it seems like something somewhere in the SDL code needs to be changed.
You may have to install Command Line tools from Xcode.
JiangOn Sun, Aug 5, 2012 at 8:16 AM, Trev wrote:
I just got the latest zipped SDL2 and I still get the error at
SDL_config_macosx.h:28, where it mentions AvailabilityMacros.h is missing.
I’ve just been trying to build the included Xcode projects.
I tried commenting out those 3 lines about SDL_VIDEO_DRIVER_X11 and I get
the same error.
It seems like 10.8 removed AvailabilityMacros.h from the SDK, so it seems
like something somewhere in the SDL code needs to be changed.
OSX 10.8 dosent come with X11 anymore you need to download Quartz so I’m guessing the directory changed as well
Jjgod Jiang wrote:> On Sun, Aug 5, 2012 at 8:16 AM, Trev wrote:
I just got the latest zipped SDL2 and I still get the error at
SDL_config_macosx.h:28, where it mentions AvailabilityMacros.h is missing.
I’ve just been trying to build the included Xcode projects.
I tried commenting out those 3 lines about SDL_VIDEO_DRIVER_X11 and I get
the same error.
It seems like 10.8 removed AvailabilityMacros.h from the SDK, so it seems
like something somewhere in the SDL code needs to be changed.
You may have to install Command Line tools from Xcode.
I’m still getting some errors when trying to install with ./configure then make
…/src/video/cocoa/SDL_cocoamodes.m: In function ?CG_SetError?:
…/src/video/cocoa/SDL_cocoamodes.m:105: error: ?kCGErrorNameTooLong? undeclared (first use in this function)
…/src/video/cocoa/SDL_cocoamodes.m:105: error: (Each undeclared identifier is reported only once
…/src/video/cocoa/SDL_cocoamodes.m:105: error: for each function it appears in.)
…/src/video/cocoa/SDL_cocoamodes.m:117: error: ?kCGErrorNoCurrentPoint? undeclared (first use in this function)
make: *** [build/SDL_cocoamodes.lo] Error 1
any ideas?
stevo5800 wrote:> OSX 10.8 dosent come with X11 anymore you need to download Quartz so I’m guessing the directory changed as well
I just got the latest zipped SDL2 and I still get the error at
SDL_config_macosx.h:28, where it mentions AvailabilityMacros.h is missing.
I’ve just been trying to build the included Xcode projects.
I tried commenting out those 3 lines about SDL_VIDEO_DRIVER_X11 and I get
the same error.
It seems like 10.8 removed AvailabilityMacros.h from the SDK, so it seems
like something somewhere in the SDL code needs to be changed.
You may have to install Command Line tools from Xcode.
I’m still getting some errors when trying to install with ./configure
then make
…/src/video/cocoa/SDL_cocoamodes.m:105: error: ?kCGErrorNameTooLong?
…/src/video/cocoa/SDL_cocoamodes.m:117: error: ?kCGErrorNoCurrentPoint?
I’m still getting some errors when trying to install with ./configure
then make
…/src/video/cocoa/SDL_cocoamodes.m:105: error: ?kCGErrorNameTooLong?
…/src/video/cocoa/SDL_cocoamodes.m:117: error: ?kCGErrorNoCurrentPoint?
This was fixed in revision control last night.
–ryan.
That fixes that, but still 3 more lines need to be commented out for a successful compile on 10.8, specifically:
(…or build from the command line, where the configure script will
notice that you don’t have X11 installed and disable that target. We
don’t have that luxury in Xcode, though. If we ever manage to move to
CMake, it’ll fix this issue, as it’ll check for X11 and generate the
Xcode project files.)
(…or build from the command line, where the configure script will notice
that you don’t have X11 installed and disable that target. We don’t have
that luxury in Xcode, though. If we ever manage to move to CMake, it’ll fix
this issue, as it’ll check for X11 and generate the Xcode project files.)
(…or build from the command line, where the configure script will
notice that you don’t have X11 installed and disable that target. We don’t
have that luxury in Xcode, though. If we ever manage to move to CMake,
it’ll fix this issue, as it’ll check for X11 and generate the Xcode
project files.)