SDL.mcp compile errors

I’m trying to compile the SDL libraries on the Mac using CodeWarrior Pro 5.3
so I can run the SDL demos. I’m doing this using the project “SDL.mcp” that
comes with the SDL Sources package in the CWProjects folder. Every target
compiles successfully except these two:

SDL MacOS Release StdCLib
SDLmain MacOS StdCLib

Below are the errors I get from attempting to make the “SDLmain MacOS
StdCLib” target. The errors for “SDL MacOS Release StdCLib” are similar.

Error : illegal function definition
wcstoul.h line 33 wint_t

Error : declaration syntax error
wcstoul.h line 34 void * ReadProcArg, /* mm 990326 */

Error : declaration syntax error
wcstoul.h line 35 int * chars_scanned,

Error : declaration syntax error
wcstoul.h line 36 int * negative,

Error : declaration syntax error
wcstoul.h line 37 int * overflow);

Error : illegal function definition
wcstoul.h line 42 wint_t

Error : declaration syntax error
wcstoul.h line 43 void * ReadProcArg, /* mm 990326 */

Error : declaration syntax error
wcstoul.h line 44 int * chars_scanned,

Error : declaration syntax error
wcstoul.h line 45 int * negative,

Error : declaration syntax error
wcstoul.h line 46 int * overflow);

Funny thing is, wcstoul.h is part of the Metrowerks Standard Library – not
even part of SDL. But I have no idea how to fix these errors so the thing
will compile. Any ideas?

-Vern

I’m trying to compile the SDL libraries on the Mac using CodeWarrior Pro 5.3
so I can run the SDL demos. I’m doing this using the project “SDL.mcp” that
comes with the SDL Sources package in the CWProjects folder. Every target
compiles successfully except these two:

SDL MacOS Release StdCLib
SDLmain MacOS StdCLib

Below are the errors I get from attempting to make the “SDLmain MacOS
StdCLib” target. The errors for “SDL MacOS Release StdCLib” are similar.

Error : illegal function definition
wcstoul.h line 33 wint_t

The headers for these targets are not the MSL ones. They are the ones from
MPW, included in the directory “Support/MacOS/StdCLib” (IIRC).

I have only included the headers that are needed in that directory, so
probably a new header has been added to SDL that I have to add to this
directory or some other hack is now required.

Something to try might be enabling/disabling wide character support in the
target settings->c/c++ compiler settings dialog.

The point of compiling against StdCLib is that SDL doesn’t have to static
link the MSL library which shaves about 100KB off the shared library.
StdCLib is part of the Mac OS, while MSL is not. Also it seems that
StdCLib’s stdio functions work with files that have Unix or DOS line
breaks, which tends to be useful when porting things.

-DOn Tue, 16 Apr 2002, Vern Jensen wrote: