Questions about upgrading old projects to latest SDL on Mac OS X

Dear SDL group,
I must say that I am learning a lot in this process, but I have a couple
questions. First, a description of what I am trying to do. I have an older
Project Builder project using SDL that was written by someone else that I am
importing into Xcode 2.5. Later I will take it on up to the latest version
of Xcode, but I am taking baby steps. I downloaded the latest SDL 1.3 from
svn and compiled it using the latest Xcode. It took a while, but I was able
to get it to build with only some warnings. I also grabbed SDL_image and
SDL_mixer. I placed my frameworks in the recommended /Library/Frameworks
folder and placed the templates in their folder, even thogh I will not be
using them for this project.

I was able to bring the Project Builder project into Xcode 2.5 and made the
neccessary target upgrades and tried to build. Oh, I almost forgot, the SDL,
SDL_image and SDL_mixer are in the Frameworks -> Other Frameworks section of
Groups and Files in Xcode. The first errors I got were about SDL.h and some
other SDL headers not find. I did some searching the SDL archives and read
something about #import “SDL.h” needed to be changed to <SDL/SDL.h> in the
SDLMain.m file. So I went in and made the change. More errors about not
finding SDL_image.h and SDL_mixer.h in my system.h file. So I went in and
changed the includes to <SDL_image/SDL_image.h> and <SDL_mixer/SDL_mixer.h>.
Now we are starting to get somewhere, but still more errors. The new errors
are that it can’t find any of the hearder files in the SDL.Frameworks from
the SDL_mixer.h file and the SDL_image.h file. So I go into the SDL_image
and SDL_mixer frameworks and change all of the includes to <SDL/SDL_xxxx.h>
and I now only get 1 error during build.

Now my first question, I can see why changing my header files to <SDL/SDL.h>
and so on, but why did I have to go into the framework header files for
SDL_image and SDL_mixer and make changes there? Doesn’t the compiler search
through the frameworks folder to look for dependencies? Did I miss something
in the project settings? I am just worried that now I have changed the
framework files and are they still going to work if I create a new project
that needs to use the SDL frameworks. Am I going to have to go back and
change the includes to “SDL_xxxx.h”?

My second question has to do with my 1 error. In one of the c files,
input.c, there is an array that is declared to handle the state of key
presses and it is complaining about SDLK_LAST being undeclared.

Here is the code:
bool key_pressed[SDLK_LAST]; // array of states (pressed/released) of all
keys

Here is the error:
‘SDLK_LAST’ undeclared here (not in a function)

I did a search for SDLK_LAST and found it in the SDL svn that I had
downloaded in /SDL/src/video/riscos/SDL_riscosevents.c. When I open that
file, I see that it is not being defined in there, but is also being used in
declaring an array. Is SDLK_LAST being declared somewhere that I can’t find,
or is this an old constant that has been changed to something else?

Thanks in advance for all your help.
Rick

Hiyya, sounds like a great project. I woulden’t use the latest sdl unless you are willing to continue to change things. It’s not done being made yet. I would use the finished version you can download at the sdl website. If the version od xcode is finished I would work on that side of the upgrade first. Since xcode is for apple I wonder. Did you decide to use sdl because it’s easy, it’s what you have now, or you want to remove the xcode and use sdl only?------------------------

---- Rick Page wrote:

=============
Dear SDL group,
I must say that I am learning a lot in this process, but I have a couple
questions. First, a description of what I am trying to do. I have an older
Project Builder project using SDL that was written by someone else that I am
importing into Xcode 2.5. Later I will take it on up to the latest version
of Xcode, but I am taking baby steps. I downloaded the latest SDL 1.3 from
svn and compiled it using the latest Xcode. It took a while, but I was able
to get it to build with only some warnings. I also grabbed SDL_image and
SDL_mixer. I placed my frameworks in the recommended /Library/Frameworks
folder and placed the templates in their folder, even thogh I will not be
using them for this project.

I was able to bring the Project Builder project into Xcode 2.5 and made the
neccessary target upgrades and tried to build. Oh, I almost forgot, the SDL,
SDL_image and SDL_mixer are in the Frameworks -> Other Frameworks section of
Groups and Files in Xcode. The first errors I got were about SDL.h and some
other SDL headers not find. I did some searching the SDL archives and read
something about #import “SDL.h” needed to be changed to <SDL/SDL.h> in the
SDLMain.m file. So I went in and made the change. More errors about not
finding SDL_image.h and SDL_mixer.h in my system.h file. So I went in and
changed the includes to <SDL_image/SDL_image.h> and <SDL_mixer/SDL_mixer.h>.
Now we are starting to get somewhere, but still more errors. The new errors
are that it can’t find any of the hearder files in the SDL.Frameworks from
the SDL_mixer.h file and the SDL_image.h file. So I go into the SDL_image
and SDL_mixer frameworks and change all of the includes to <SDL/SDL_xxxx.h>
and I now only get 1 error during build.

Now my first question, I can see why changing my header files to <SDL/SDL.h>
and so on, but why did I have to go into the framework header files for
SDL_image and SDL_mixer and make changes there? Doesn’t the compiler search
through the frameworks folder to look for dependencies? Did I miss something
in the project settings? I am just worried that now I have changed the
framework files and are they still going to work if I create a new project
that needs to use the SDL frameworks. Am I going to have to go back and
change the includes to “SDL_xxxx.h”?

My second question has to do with my 1 error. In one of the c files,
input.c, there is an array that is declared to handle the state of key
presses and it is complaining about SDLK_LAST being undeclared.

Here is the code:
bool key_pressed[SDLK_LAST]; // array of states (pressed/released) of all
keys

Here is the error:
‘SDLK_LAST’ undeclared here (not in a function)

I did a search for SDLK_LAST and found it in the SDL svn that I had
downloaded in /SDL/src/video/riscos/SDL_riscosevents.c. When I open that
file, I see that it is not being defined in there, but is also being used in
declaring an array. Is SDLK_LAST being declared somewhere that I can’t find,
or is this an old constant that has been changed to something else?

Thanks in advance for all your help.
Rick

can anyone explain what xcode is in 3 lines? :wink: lazy dumbass here

http://tinyurl.com/cm7cnm>________________________________

From: Neil White
Subject: Re: [SDL] Questions about upgrading old projects to latest SDL on Mac OS X

can anyone explain what xcode is in 3 lines? :wink: lazy dumbass here

Xcode is like Visual C for Windows, but for the Mac
RickOn Fri, Mar 6, 2009 at 2:11 PM, Neil White wrote:

can anyone explain what xcode is in 3 lines? :wink: lazy dumbass here


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

can anyone explain what xcode is in 3 lines? :wink: lazy dumbass here

It’s the standard development environment for Mac OS X (free download
from Apple). It uses gcc, gdb and friends as its backend, and that’s
in fact the easiest way to get yourself a development environment set
up on Mac OS X, even if you’re not going to use the GUI tools (just
get and install the Xcode package, and off you go).On Fri, Mar 6, 2009 at 3:11 PM, Neil White wrote:


http://pphaneuf.livejournal.com/

google ?

http://en.wikipedia.org/wiki/XcodeOn Fri, 6 Mar 2009, Neil White wrote:

can anyone explain what xcode is in 3 lines? :wink: lazy dumbass here

OK, I figured I was taking too big of a jump, so I started over with the
original Project Builder project and with SDL 1.2. I was able to get it into
Xcode 2.5 and after some modifications I mentioned in my original post, I
have a successful build. The only warning I get is about NSQuickDrawView
being deprecated, but I think I read in the archives at how to deal with
that. Then it will be to get it into Xcode 3 and then working with SDL 1.3.
RickOn Fri, Mar 6, 2009 at 2:20 PM, wrote:

google ?

http://en.wikipedia.org/wiki/Xcode

On Fri, 6 Mar 2009, Neil White wrote:

can anyone explain what xcode is in 3 lines? :wink: lazy dumbass here


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

pierre wins the satify dumbasses curiosity award :wink:

i keep meaning to setup something mac to try to compile stuff and never sure
how to do it, all this old mac new mac dual binary x11 or not and everything
puts me off, and the fact i dont have a mac to destroy :wink:

No way… Mason hit it dead on!

ROFL,
Jonny DOn Fri, Mar 6, 2009 at 3:35 PM, Neil White wrote:

pierre wins the satify dumbasses curiosity award :wink:

i keep meaning to setup something mac to try to compile stuff and never
sure how to do it, all this old mac new mac dual binary x11 or not and
everything puts me off, and the fact i dont have a mac to destroy :wink:


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org