view Xcode/SDL/pkg-support/resources/ReadMeDevLite.txt @ 2994:7563b99e9a49

Date: Sat, 3 Jan 2009 22:11:18 -0500 From: "Donny Viszneki" Subject: Re: [SDL] Want to help with SDL 1.3? >> > For example, here's a good quick project for someone from the TODO list: >> > * Add diagonal line clipping to SDL_IntersectRectAndLine() Just wanted to point out that the patch is available at http://codebad.com/rect-line-ix.patch I hereby grant Sam Lantinga an irrevocable non-exclusive distribution license to this patch to do with as he wishes.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 04 Jan 2009 19:33:21 +0000
parents d63e9f5944ae
children
line wrap: on
line source

This directory is for developers. This directory contains some basic essentials you will need for developing SDL based applications on OS X. The SDL-devel package contains all of this stuff plus more, so you can ignore this if you install the SDL-devel.pkg. The SDL-devel package contains Project Builder/Xcode templates, SDL documentation, and different variations of SDLmain and NIB files for SDL.

To compile an SDL based application on OS X, SDLMain.m must be compiled into your program. (See the SDL FAQ). The SDL-devel.pkg includes Project Builder/Xcode templates which already do this for you. But for those who may not want to install the dev package, an SDLMain is provided here as a convenience. Be aware that there are different variations of SDLMain.m depending on what class of SDL application you make and they are intended to work with NIB files. Only one SDLMain variant is provided here and without any NIB files. You should look to the SDL-devel package for the others. We currently do not provide a SDLMain.a file, partly to call to attention that there are different variations of SDLmain.

To build from the command line, your gcc line will look something like this:

gcc -I/Library/Frameworks/SDL.framework/Headers MyProgram.c SDLmain.m -framework SDL -framework Cocoa

An SDL/OpenGL based application might look like:

gcc -I/Library/Frameworks/SDL.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers MyProgram.c SDLmain.m -framework SDL -framework Cocoa -framework OpenGL