[SDL] MAC OS X

julien CLEMENT clementj2005 at yahoo.fr
Sat Dec 6 05:05:58 PST 2008


Personnally, I use the "fink" package system.
The main advantage is that I can compile my source code on Linux and Mac OS X with minor changes.
Also, I strongly advise you to use "sdl-config" and never include SDL with the "SDL" prefix, or your code will mess (and so on for SDL derived libraries like SDL_image).

A typical compilation line is:

gcc progsdl.c -o progsdl $(sdl-config --cflags --libs)

On Mac OS X, with fink, it will be perfectly OK.
Note that you can replace the $(some stuff) notation by `some stuff`

The drawback of this method is that it builds "console" applications, so you need to make your own Mac OS X package if you want your binary beeing embedded in a Mac OS X Application tree. Using XCode and the SDL Mac OS X packages avoid this trouble.

Hope this can help

Cheers
Julien




      




More information about the SDL mailing list