Anders F Björklund afb at algonet.se
Tue Sep 6 14:54:51 PDT 2005

E. Wing wrote:

>> ldflags were: -framework SDL -framework Cocoa -lobjc 
>> /path/to/libSDLmain.a
> FYI, the -lobjc isn't necessary because it is automatically brought in
> by -framework Cocoa as far as I know.

It isn't needed at all if you use the Carbon driver instead ;-)
But you are right, it should not be needed when including Cocoa.

For some reason, the default sdl-config does include OpenGL too ?
Not sure if it does that on other platforms ? (besides Mac OS X)
OpenGL should always be available, just found it a little strange.
Maybe it's a side effect of SDL_loadso.c being broken earlier on ?
(i.e. not working by default on Mac OS X before it had the dlfcn)

I think it should find /System/Library/Frameworks/OpenGL.framework,
and it seems to be able to if I just omit the "-framework OpenGL"
when building the testdyngl application (but with -DHAVE_OPENGL)
So it could be something that should be changed, in the configure ?
(easy enough to use "dlcompat" on platforms before Mac OS X 10.4)

>> Unlike lots of other UNIX systems, /usr/local/bin is in the default 
>> executable
>> path under OSX.  Put it there and it should work.
> No, it is not. Every new install or new account of OS X I have never
> includes /usr/local/bin in the path. In fact, I currently have an
> account open in front of me that doesn't have /usr/local/bin in the
> path.

Side note:
It seems like Mono install their stuff (symlinks) in /usr/bin instead,
but that does feel a bit "naughty" (probably being reserved by Apple ?)

They do have a pretty interesting little hack going *inside* their 
	Commands@ -> Versions/Current/bin
	Headers@ -> Versions/Current/include
	Libraries@ -> Versions/Current/lib
	Mono@ -> Libraries/libmono.dylib
	Resources@ -> 
But I'm not sure that mixing NeXTs and Oranges like that is the 

We _could_ do a link from /usr/bin/sdl-config, but probably *not* 
automatic ?

Hiding it inside the bundle (in "Commands/") is a good compromise here, 
There if you need it, simple to add an alias or symlink to put it in 
the PATH.
It also works for the other frameworks, such as e.g. the SDL_image 
framework ?


On the other platforms, they all live in $PREFIX/include/SDL. Not so, 
on OS X:


Adding the extra includes is probably better than rewriting all other 


More information about the SDL mailing list