[SDL] Re: SDL & Project Builder
ewing2121 at yahoo.com
Fri Jan 24 09:34:00 PST 2003
Thanks again for the great response Johannes. Sorry
for the delay in follow up, but it took me awhile to
So I think I have one last set of followup questions
I read the disclaimer about Umbrella Frameworks and it
sounds like Apple doesn't want you to use them, so
I'll avoid those for now.
So one of the things I'm working with right now is
SDL_sound. The current SDL_sound project doesn't work
for me because I think it's too old, so I've tried
creating a new one. SDL_sound depends on a whole lot
of external codecs (Smpeg, Ogg Vorbis, Mikmod, etc)
which I also have to build projects for. Furthermore,
I am building a library that depends on SDL_sound. And
finally, my application depends on SDL_sound and my
So one thing I've been trying to understand is this
field in Target called: "Install Location"
I noticed all the SDL frameworks select:
This looks a lot like the otool -L data you displayed
in a previous message.
So I decided to copy this field on all my Frameworks
that I was building. I put it in Ogg, Vorbis, Mikmod,
SDL_sound, and my app.
However, when I did this, I was able to compile Ogg,
Vorbis, Mikmod, and SDL_sound okay. But when I got to
compiling my library, I got an error message like:
Can't find @executable_path/../Frameworks (does not
exist) for the codecs (Ogg,Vorbis,Mikmod)
But if I remove the
from Ogg,Vorbis,Mikmod (and I forgot what about
SDL_sound) then my stuff compiles.
So I'm confused about this field and what I'm supposed
to do with it. Why do all the SDL projects set it to
this path? And does it hurt to leave it to none (i.e.
can I still drop Frameworks into any of the bundle
And also, even though everything otool -L says
is it possible to drop it into SharedFrameworks
instead? To me it seems that I would typically want
the user to use a newer version of SDL if they already
had it on their system instead of being locked down by
And can you recommend a good system of testing if the
Frameworks subdirectories work. (It's really hard to
verify since everything is installed in my regular
/Library/Frameworks folder too.)
> > But can you go into a little more detail about how
> > can bundle frameworks inside
> > an app using Project Builder? I'm still a little
> > confused on the issue.
> It is. This box tells the compiler where to find
> _your_ private =20
> framework directory. Since you placed SDL.framework
> into =20
> /Library/Frameworks, which is the standard location,
> you shouldn't have =20=
> any problem with this, anyway. What you really want
> is to tell the =20
> compiler to _link_ with the framework. Either drag
> the framework in way =20=
> down, under "Frameworks & Libraries", or select "Add
> Frameworks=85" from =
> the "Project" menu. A third way would be to specify
> "-framework SDL" in =20=
> the linker settings.
> Note that all this still doesn't change your
> _header_ search path: if =20=
> you do #include "SDL.h", you'll have to add =20
> to =20=
> your header search paths. #include'ing "SDL/SDL.h"
> should work fine, =20
> though I haven't verified this.
> The resulting app first searches for the framework
> in your .app bundle =
> (under "Frameworks", "PrivateFrameworks" and
> "SharedFrameworks", just =20=
> as documented in the link from my last mail), and if
> it's not there, in =20=
> /Users/yourusername/Library/Frameworks and =20
> To have Project Builder automatically copy the
> Framework to your .app =20=
> bundle, add a new "Copy files" build phase
> ("Project/New Build =20
> Phase/New copy files build phase"). You seem to have
> an active =20
> selection in the "Build Phases" list GUI to do this.
> Under "Where" =20
> select "Frameworks", no subpath; drag the framework
> bundle into the box =20=
> down there.
> > (snip)
> > And is there a way to bundle Frameworks within
> > frameworks? I would like to build
> > a framework (library) that uses SDL and lots of
> > libs.
> I guess not. This would, of course, also defeat the
> whole purpose of =20
> this exercise: to still be able to easily exchange
> (e.g.) the =20
> SDL.framework with a newer version, on a per-app
> basis, if needed.
> If you really want to do this, you could look into
> "Umbrella =20
> HTH, and sorry to Sam, who has to approve of all my
> mails, because my =20=
> "From" header is getting garbled by the mail server
> Johannes Fortmann=
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
More information about the SDL