Sdl and macos x compile

Hey everyone,

this is my first post here. I’m just now trying my first cross-compile on
macos x. I can get the thing to compile and link dynamically with project
builder, but would love to get it to link statically. any hints here?

sorry for posting this here, but the the mail archive is not searchable
and I couldn’t find anything about it in the FAQ for os x.

btw, what is the prefered method to release SDL apps for macos X?
static or dynamic?

oh yeah, any news on Events under os X? I can’t get them to work at all.

thanks a lot -august.

ok, seems like I’ll be answering my own post.

you start a new SDL project in project builder

you’ll then need to at the libSDL.a to your project. (I had to get this
from compiling the src with ./configure make - I couldn’t fine the .a
file after installing the SDL-devel.pkg)

then under Targets, Linker Settings, take away “-framework SDL” and add:

-all_load -framework OpenGL -framework AGL -framework IOKit -framework
Cocoa -framework Carbon -framework QuickTime

that should do it, althought I’m still getting used to this project
builder thing. its all very shimanic compared to straight-ahead
makefiles, imho.

-august.On Mon, 8 Dec 2003, august wrote:

Hey everyone,

this is my first post here. I’m just now trying my first cross-compile on
macos x. I can get the thing to compile and link dynamically with project
builder, but would love to get it to link statically. any hints here?

sorry for posting this here, but the the mail archive is not searchable
and I couldn’t find anything about it in the FAQ for os x.

btw, what is the prefered method to release SDL apps for macos X?
static or dynamic?

oh yeah, any news on Events under os X? I can’t get them to work at all.

thanks a lot -august.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

In the OSX readme:

“- Setting up a new project by hand
Some of you won’t want to use the Stationary so I’ll give some tips:
* Create a new “Cocoa Application”
* Add src/main/macosx/SDLMain.m , .h and .nib to your project
* Remove “main.c” from your project
* Remove “MainMenu.nib” from your project
* Add “$(HOME)/Library/Frameworks/SDL.framework/Headers” to include
path
* Add “$(HOME)/Library/Frameworks” to the frameworks search path
* Add “-framework SDL -framework Foundation -framework AppKit” to
"OTHER_LDFLAGS”
* Set the “Main Nib File” under “Application Settings” to
"SDLMain.nib"
* Add your files
* Clean and build"

The prefered way of deploying apps in OSX is drag and drop. In order to
implement this you have to do a few things:
-statically link the framework. Go into project settings and add
"@executable_path/…/Frameworks/SDL.framework/Headers" to headers
search path.
-add a build phase “Copy Files Build Phase” select the SDL frameworks
you want to copy into the .app bundle, and set the path to “Frameworks”
-build and run. Make sure zero-link is disabled if this is a deployment
project in Panther.

Additional help can be found at:
http://www.idevgames.com/
and on the mac game dev mailing list:

HTH–
Jericho

On Dec 7, 2003, at 9:28 PM, august wrote:

ok, seems like I’ll be answering my own post.

you start a new SDL project in project builder

you’ll then need to at the libSDL.a to your project. (I had to get
this
from compiling the src with ./configure make - I couldn’t fine the .a
file after installing the SDL-devel.pkg)

then under Targets, Linker Settings, take away “-framework SDL” and
add:

-all_load -framework OpenGL -framework AGL -framework IOKit -framework
Cocoa -framework Carbon -framework QuickTime

that should do it, althought I’m still getting used to this project
builder thing. its all very shimanic compared to straight-ahead
makefiles, imho.

-august.

On Mon, 8 Dec 2003, august wrote:

Hey everyone,

this is my first post here. I’m just now trying my first
cross-compile on
macos x. I can get the thing to compile and link dynamically with
project
builder, but would love to get it to link statically. any hints here?

sorry for posting this here, but the the mail archive is not
searchable
and I couldn’t find anything about it in the FAQ for os x.

btw, what is the prefered method to release SDL apps for macos X?
static or dynamic?

oh yeah, any news on Events under os X? I can’t get them to work at
all.

thanks a lot -august.

I made an error i my last post
statically linking should be done by setting the target’s information
for framework search paths to: “@executable_path/…/Frameworks”

Sorry for the confusion.–
Jericho
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: text/enriched
Size: 222 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031208/7adf403a/attachment.bin