? bout sdl compiling on mac

hi,

I’ve been trying to get started with learning SDL, but am having some
troubles outta the gate…

Using codewarrior 6.2 and universal headers 3.4/openGL 1.2, I’ve been
trying to make projects for some of the “supposedly” MacOS compatible
demos on the SDL page…

for example, I’ve been trying to get “fire” to run, but have several problems:

  1. there is a function called “normal” in fire.c which generates two
    errors: (identifier ‘normal’ redeclared) and (call of non-function)

I assumed that this problem was due to a previously defined function
named “normal”, but there isn’t one in fire.c, and I’m not sure where
to look after that: headers? SDL_main.c?

  1. when I change the name of “normal” to “abnormal” the program
    compiles and runs, but only flickers the screen and exits…it does
    output to stderr.txt the following:
    Couldn’t set display mode: Couldn’t create shadow surface

Is there an example codewarrior project for this? I noticed that of
all of the SDL demos that claim 100% compatibility with MacOS, none
include codewarrior projects, and only one includes MPWmake
files…so, can ya help an sdl beginner out?

btw, I have had success compiling the “water” demo, and am now
working through the others…

tanx,

jamie

Make sure no errant headers are sneaking in there. Run the preprocessor
on the file to see exactly what files are being #included. (we can
discuss this off-line if you are new to CodeWarrior) In the precompiler
dump file, there should only be SDL headers in there, and maybe a few
Standard C headers (like stdio.h, for example).

The best example would be the SDLTest targets.On Tuesday, June 12, 2001, at 06:44 PM, jam wrote:

hi,

I’ve been trying to get started with learning SDL, but am having some
troubles outta the gate…

Using codewarrior 6.2 and universal headers 3.4/openGL 1.2, I’ve been
trying to make projects for some of the “supposedly” MacOS compatible
demos on the SDL page…

for example, I’ve been trying to get “fire” to run, but have several
problems:

  1. there is a function called “normal” in fire.c which generates two
    errors: (identifier ‘normal’ redeclared) and (call of non-function)

I assumed that this problem was due to a previously defined function
named “normal”, but there isn’t one in fire.c, and I’m not sure where
to look after that: headers? SDL_main.c?

  1. when I change the name of “normal” to “abnormal” the program
    compiles and runs, but only flickers the screen and exits…it does
    output to stderr.txt the following:
    Couldn’t set display mode: Couldn’t create shadow surface

Is there an example codewarrior project for this? I noticed that of
all of the SDL demos that claim 100% compatibility with MacOS, none
include codewarrior projects, and only one includes MPWmake
files…so, can ya help an sdl beginner out?

btw, I have had success compiling the “water” demo, and am now working
through the others…

tanx,

jamie