I’ve done it once. I wanted to see if Tux Paint would build easily on OSX.
I had never really used OSX before, and sat down at a friend’s laptop which had
the GNU compiler installed (assuming it doesn’t come standard?!), and was
able to build SDL, SDL_ttf, SDL_image and (I think) SDL_mixer from source,
install it into a place in his homedir (I didn’t have root on his laptop),
and then build Tux Paint, pointing it to the SDL libs where I placed them.
As you can see, application-specific junk aside, it’s not much different
than gcc on any other platform.
SDL itself uses Objective-C and Cocoa, and controls main() (calling your
mainline after some startup code)…you don’t have to use Objective-C or
Cocoa directly, though. UT2003 makes a few Carbon calls to figure out OS
version, etc, but overwhelmingly all of the Mac stuff is hidden in SDL.
To follow up, if you build SDL itself from source instead of through
Project Builder, you get the whole Unix treatment…it installs in
/usr/local/, gives you an “sdl-config” script, etc…works fine.
I seriously dislike Project Builder/Xcode/CodeWarrior, so this method
works great for me. I’m a commandline weenie.
I’ve been doing this in a C app using the OS X SDL
framework package (which I highly recommend, since you
can embed the framework in your OS X application
bundle when it comes time to distribute it, which
means your end users wont have to compile/install the
SDL library.)
I simply grab the SDLMain.m and SDLMain.h files from
where the SDL-devel-1.2.6.pkg installer put them and
compile them into a “.o” and then basically everything
else is in C (just remember to use “-lobjc” when
compiling.)
If you want to see an example Makefile check out this
open-source app:
Isn’t that just the same as compiling sdl in as a static lib? Actually, a
static lib would be smaller (no headers, etc).
Not being obnoxious, or anything, just thought I’d point out that the
framework isn’t doing anything special…On Thursday 30 October 2003 5:17 pm, Steven J-S wrote:
Anyone building SDL Apps with just GNU / OS X ?
Without Project Builder or CodeWarrior ?
I’ve been doing this in a C app using the OS X SDL
framework package (which I highly recommend, since you
can embed the framework in your OS X application
bundle when it comes time to distribute it, which
means your end users wont have to compile/install the
SDL library.)
Isn’t that just the same as compiling sdl in as a
static lib?
It would be, except for the fact that OS X doesn’t
allow you to do static linking. You can get around
this although I had endless difficulties getting my
app to run on different versions of OS X when I did it
that way. Dynamically linking with the framework and
then copying it into the app bundle is a nice
solution.
Actually, a static lib would be smaller (no
headers, etc).
That’s why there’s a non-developer version of the
framework, which doesn’t include the headers etc.
http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.On Thu, 30 Oct 2003 17:31:38 David Bishop wrote:
Hi all ,
i’m trying to build SDL for Epoc with Symbian 6.1 SDK.
I’ve followed instructions in README.Epoc but it hangs when i issue
the bldmake bldfiles command without saying nothing else.
I’ve tried the build under Windows ( not using gnupoc nor sdk2unix ).
Anyone know how to fix this problem or has some idea ?
the bldmake bldfiles command without saying nothing else.
That problem was related to symbian build tools that can’t be able to
handle spaces in path names.
Anyway i’ve created the visual c++ project files ( 2 workspaces one for
sdl and one for sdlmain ). When i try to build sdl it gives me a lot of
error on headers file he can’t be able to find ( related to X11 , OpenGL
and window.h ). There’s something i miss ?