MacOS, CodeWarrior, Linking SDL Test Apps?

I’m trying to get the SDL test apps to link on my Mac, but am having
trouble. I’m working with SDL 1.1.1, CW Pro 5 with the latest updates
(IDE 4.0.4). The linker complains as follows for the “testwin” test:

Link Error : undefined ‘SDL_Delay’ (code)
Referenced from ‘SDL_main’ in testwin.c
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UpdateRects’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_Flip’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UpperBlit’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_FreeSurface’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_DisplayFormat’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UpdateRect’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UnlockSurface’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_MapRGB’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_LockSurface’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_SetColors’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_LoadBMP_RW’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_RWFromFile’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_GetTicks’ (code)
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_WM_SetCaption’ (code)
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_SetVideoMode’ (code)
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_GetError’ (code)
Referenced from ‘DrawPict’ in testwin.c
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_InitQuickDraw’ (code)
Referenced from ‘main’ in SDL_main.c

Link Error : undefined ‘SDL_Quit’ (descriptor)
Referenced from ‘SDL_main’ in testwin.c
Referenced from ‘main’ in SDL_main.c

Link Error : undefined ‘SDL_Init’ (code)
Referenced from ‘SDL_main’ in testwin.c
Referenced from ‘main’ in SDL_main.c

I’ve precompiled the SDL.DEBUG.PPC.LIB shared library, so that’s not the
problem. I suspect that I’m just not exporting the right symbols in that
library or something. Anyone else run into problems and have a quick
solution? I’m going to dig into the CW docs…

-Roy

The symbols exporting is messed up. I modified it to build correctly, only
fixed the MacOS PPC libs though, and I don’t have OpenGL in there yet.

Here is what I have so far:

http://icdweb.cc.purdue.edu/~walisser/gltron/SDL_CWprojects.sea.hqx

HTH,
Darrell> From: Roy Wood

Reply-To: sdl at lokigames.com
Date: Wed, 22 Mar 2000 13:31:08 -0500
To:
Subject: [SDL] MacOS, CodeWarrior, Linking SDL Test Apps?

I’m trying to get the SDL test apps to link on my Mac, but am having
trouble. I’m working with SDL 1.1.1, CW Pro 5 with the latest updates
(IDE 4.0.4). The linker complains as follows for the “testwin” test:

Link Error : undefined ‘SDL_Delay’ (code)
Referenced from ‘SDL_main’ in testwin.c
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UpdateRects’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_Flip’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UpperBlit’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_FreeSurface’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_DisplayFormat’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UpdateRect’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_UnlockSurface’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_MapRGB’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_LockSurface’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_SetColors’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_LoadBMP_RW’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_RWFromFile’ (code)
Referenced from ‘DrawPict’ in testwin.c

Link Error : undefined ‘SDL_GetTicks’ (code)
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_WM_SetCaption’ (code)
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_SetVideoMode’ (code)
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_GetError’ (code)
Referenced from ‘DrawPict’ in testwin.c
Referenced from ‘SDL_main’ in testwin.c

Link Error : undefined ‘SDL_InitQuickDraw’ (code)
Referenced from ‘main’ in SDL_main.c

Link Error : undefined ‘SDL_Quit’ (descriptor)
Referenced from ‘SDL_main’ in testwin.c
Referenced from ‘main’ in SDL_main.c

Link Error : undefined ‘SDL_Init’ (code)
Referenced from ‘SDL_main’ in testwin.c
Referenced from ‘main’ in SDL_main.c

I’ve precompiled the SDL.DEBUG.PPC.LIB shared library, so that’s not the
problem. I suspect that I’m just not exporting the right symbols in that
library or something. Anyone else run into problems and have a quick
solution? I’m going to dig into the CW docs…

-Roy

The symbols exporting is messed up. I modified it to build correctly, only
fixed the MacOS PPC libs though, and I don’t have OpenGL in there yet.

Here is what I have so far:

http://icdweb.cc.purdue.edu/~walisser/gltron/SDL_CWprojects.sea.hqx

Cool. I just got things to finally link correctly myself, but your work
is cleaner, so I’ll go with it.

Can we get these CW projects committed back to the SDL CVS archive?

-Roy

The symbols exporting is messed up. I modified it to build correctly, only
fixed the MacOS PPC libs though, and I don’t have OpenGL in there yet.

Here is what I have so far:

http://icdweb.cc.purdue.edu/~walisser/gltron/SDL_CWprojects.sea.hqx

One more note-- the CursorDevicesGlue.o lib should be included in the
debug version of the shared SDL library.

Oh, and the SDLtest.mcp project really ought to live in the test folder
if it’s going to be able to find/load the files it uses (picture.xbm,
icon.bmp, sample.bmp, etc.).

-Roy

The symbols exporting is messed up. I modified it to build correctly, only
fixed the MacOS PPC libs though, and I don’t have OpenGL in there yet.

Here is what I have so far:

http://icdweb.cc.purdue.edu/~walisser/gltron/SDL_CWprojects.sea.hqx

Cool. I just got things to finally link correctly myself, but your work
is cleaner, so I’ll go with it.

Can we get these CW projects committed back to the SDL CVS archive?

Yes please do. Send me a link in private e-mail to a working set of
codwarrior projects. I can’t verify them myself, so please make sure
that they are clean and complete and work on all current versions of
CodeWarrior, if possible.

Thanks!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec