[SDL] Mac SDL queries

Mike Powell belar at earthling.net
Wed Apr 26 21:37:29 PDT 2000


>Then I removed ALL these libraries, downloaded MPW, hunted out all 
>the precise libraries the makefile included, and put them in 
>CodeWarrior, and it wouldn't link because it couldn't find a symbol 
>called "__files".

Okay, I've investigated this a little more. Looked through the header 
files and finally realized how SDL manages to have code executing 
before mine ("#define SDL_main main"... Quite clever, and somehow 
rather evil ;-) ). Anyway, that's beside the point. The __files 
identifier is called from my SDL_main according to the think error, 
though I never used that identifier. I searched for it all the SDL 
headers and system headers, and found it in "cstdio", which I assume 
is CodeWarrior's version of "stdio.h", in the lines:

#define stdin  	(&__files[0])   /* mm 961031 */    /*MW-mm 961203 */
#define stdout	(&__files[1])   /* mm 961031 */    /*MW-mm 961203 */
#define stderr	(&__files[2])   /* mm 961031 */    /*MW-mm 961203 */
/* rjk 980313 add the _MSL_DLLDATA macro */
extern _MSL_DLLDATA FILE __files[];      /* mm 961031 */    /*MW-mm 961203 */

However, I still don't know what library actually declares this 
extern __files variable. Currently, I'm including: InterfaceLib, 
StdCLib, MathLib, StdCRuntime.o, PPCCRuntime.o, PPCToolLibs.o, 
OpenGLLibraryStub, OpenGLUtilityStub, SDL and SDLmain.o. Everything 
besides the GL and SDL libraries were stolen from MPW, which I think 
might be part of the problem. The MPW libraries may not totally agree 
with the CodeWarrior includes. Could you maybe list out exactly what 
CodeWarrior libraries you're including in your projects, Kyle?

      ,---------------------------------------------------------.
     / _/_/_/    _/_/_/  _/        _/    _/_/   Michael Powell  /
    / _/    _/  _/      _/      _/  _/  _/  _/                 /
   / _/_/_/    _/_/    _/      _/_/_/  _/_/     Aspiring      /
  / _/    _/  _/      _/      _/  _/  _/  _/   Video Game    /
/ _/_/_/    _/_/_/  _/_/_/  _/  _/  _/  _/   Programmer    /
`---------------------------------------------------------'



More information about the SDL mailing list