Is there even anyone on this list using a Mac with MacOS 8.5 or above
(but below OS-X) and successfully making SDL apps? The README.MacOS is
scant to put it politely - and full of errors, or out of date, and
lacking on some crucial information that seems plentiful for Linux and
Win32. I had zero problems getting Linux set up - I can do it in my
sleep. And I had even less problems getting the cross compiler for win32
to work. Why then is the World’s Easiest Operating System such a pain in
the ass to get set up correctly for SDL? MPW installed easily. There was
zero documentation on getting GL installed - I finally installed the
run-time and put the core “h” files into the “CIncludes” and the
libraries into the shared libraries folder. It worked, but I hated
having to guess. However, SDL seemed to still buck a successfull compile
- or rather, link. Looky at this…
Linker Output from compiling MacOS SDL:
PPCLink -o “:lib:SDL” “:obj:SDL.c.x” “:obj:SDL_error.c.x”
":obj:SDL_fatal.c.x" “:obj:SDL_getenv.c.x” “:obj:SDL_audio.c.x”
":obj:SDL_audiocvt.c.x" “:obj:SDL_audiomem.c.x” “:obj:SDL_mixer.c.x”
":obj:SDL_wave.c.x" “:obj:SDL_romaudio.c.x” “:obj:SDL_RLEaccel.c.x”
":obj:SDL_blit.c.x" “:obj:SDL_blit_0.c.x” “:obj:SDL_blit_1.c.x”
":obj:SDL_blit_A.c.x" “:obj:SDL_blit_N.c.x” “:obj:SDL_stretch.c.x”
":obj:SDL_gamma.c.x" “:obj:SDL_bmp.c.x” “:obj:SDL_cursor.c.x”
":obj:SDL_pixels.c.x" “:obj:SDL_surface.c.x” “:obj:SDL_video.c.x”
":obj:SDL_yuv.c.x" “:obj:SDL_yuv_sw.c.x” “:obj:SDL_macevents.c.x”
":obj:SDL_macmouse.c.x" “:obj:SDL_romvideo.c.x” “:obj:SDL_dspvideo.c.x”
":obj:SDL_macgl.c.x" “:obj:SDL_macwm.c.x” “:obj:SDL_active.c.x”
":obj:SDL_events.c.x" “:obj:SDL_keyboard.c.x” “:obj:SDL_mouse.c.x”
":obj:SDL_resize.c.x" “:obj:SDL_joystick.c.x” “:obj:SDL_sysjoystick.c.x”
":obj:SDL_quit.c.x" “:obj:SDL_cdrom.c.x” “:obj:SDL_syscdrom.c.x”
":obj:SDL_thread.c.x" “:obj:SDL_syscond.c.x” “:obj:SDL_sysmutex.c.x”
":obj:SDL_syssem.c.x" “:obj:SDL_systhread.c.x” “:obj:SDL_timer.c.x”
":obj:SDL_MPWtimer.c.x" “:obj:SDL_endian.c.x” “:obj:SDL_rwops.c.x”
- at export “:src:main:macos:exports:SDL.x” -t ‘shlb’ -c ‘???’ -xm s
"Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:InterfaceLib"
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:StdCLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:MathLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:StdCRuntime.o”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:PPCCRuntime.o”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:PPCToolLibs.o”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:CursorDevicesGlue.o”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:InputSprocketLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:DrawSprocketLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:DialogsLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:OpenGLLibraryStub”
Warning: Exported symbol "SDL_Init
SDL_InitSubSystem
SDL_QuitSubSystem
SDL_WasInit
SDL_Quit
SDL_GetAppState
SDL_AudioInit
SDL_AudioQuit
SDL_AudioDriverName
SDL_OpenAudio
SDL_GetAudioStatus
SDL_PauseAudio
SDL_LoadWAV_RW
SDL_FreeWAV
SDL_BuildAudioCVT
SDL_ConvertAudio
SDL_MixAudio
SDL_LockAudio
SDL_UnlockAudio
SDL_CloseAudio
SDL_CDNumDrives
SDL_CDName
SDL_CDOpen
SDL_CDStatus
SDL_CDPlayTracks
SDL_CDPlay
SDL_CDPause
SDL_CDResume
SDL_CDStop
SDL_CDEject
SDL_CDClose
SDL_ReadLE16
SDL_ReadBE16
SDL_ReadLE32
SDL_ReadBE32
SDL_ReadLE64
SDL_ReadBE64
SDL_WriteLE16
SDL_WriteBE16
SDL_WriteLE32
SDL_WriteBE32
SDL_WriteLE64
SDL_WriteBE64
SDL_SetError
SDL_GetError
SDL_ClearError
SDL_PumpEvents
SDL_PeepEvents
SDL_PollEvent
SDL_WaitEvent
SDL_PushEvent
SDL_SetEventFilter
SDL_GetEventFilter
SDL_EventState
SDL_putenv
SDL_getenv
SDL_NumJoysticks
SDL_JoystickName
SDL_JoystickOpen
SDL_JoystickOpened
SDL_JoystickIndex
SDL_JoystickNumAxes
SDL_JoystickNumBalls
SDL_JoystickNumHats
SDL_JoystickNumButtons
SDL_JoystickUpdate
SDL_JoystickEventState
SDL_JoystickGetAxis
SDL_JoystickGetHat
SDL_JoystickGetBall
SDL_JoystickGetButton
SDL_JoystickClose
SDL_EnableUNICODE
SDL_EnableKeyRepeat
SDL_GetKeyState
SDL_GetModState
SDL_SetModState
SDL_GetKeyName
SDL_GetMouseState
SDL_GetRelativeMouseState
SDL_WarpMouse
SDL_CreateCursor
SDL_SetCursor
SDL_GetCursor
SDL_FreeCursor
SDL_ShowCursor
SDL_CreateMutex
SDL_mutexP
SDL_mutexV
SDL_DestroyMutex
SDL_CreateSemaphore
" is not defined
Warning: Exported symbol "SDL_DestroySemaphore
SDL_SemWait
SDL_SemTryWait
SDL_SemWaitTimeout
SDL_SemPost
SDL_SemValue
SDL_CreateCond
SDL_DestroyCond
SDL_CondSignal
SDL_CondBroadcast
SDL_CondWait
SDL_CondWaitTimeout
SDL_RWFromFile
SDL_RWFromFP
SDL_RWFromMem
SDL_AllocRW
SDL_FreeRW
SDL_GetWMInfo
SDL_CreateThread
SDL_ThreadID
SDL_GetThreadID
SDL_WaitThread
SDL_KillThread
SDL_GetTicks
SDL_Delay
SDL_SetTimer
SDL_AddTimer
SDL_RemoveTimer
SDL_Linked_Version
SDL_VideoInit
SDL_VideoQuit
SDL_VideoDriverName
SDL_GetVideoSurface
SDL_GetVideoInfo
SDL_VideoModeOK
SDL_ListModes
SDL_SetVideoMode
SDL_UpdateRects
SDL_UpdateRect
SDL_Flip
SDL_SetGamma
SDL_SetGammaRamp
SDL_GetGammaRamp
SDL_SetColors
SDL_SetPalette
SDL_MapRGB
SDL_MapRGBA
SDL_GetRGB
SDL_GetRGBA
SDL_CreateRGBSurface
SDL_CreateRGBSurfaceFrom
SDL_FreeSurface
SDL_LockSurface
SDL_UnlockSurface
SDL_LoadBMP_RW
SDL_SaveBMP_RW
SDL_SetColorKey
SDL_SetAlpha
SDL_SetClipRect
SDL_GetClipRect
SDL_ConvertSurface
SDL_UpperBlit
SDL_LowerBlit
SDL_FillRect
SDL_DisplayFormat
SDL_DisplayFormatAlpha
SDL_CreateYUVOverlay
SDL_LockYUVOverlay
SDL_UnlockYUVOverlay
SDL_DisplayYUVOverlay
SDL_FreeYUVOverlay
SDL_GL_LoadLibrary
SDL_GL_GetProcAddress
SDL_GL_SetAttribute
SDL_GL_GetAttribute
SDL_GL_SwapBuffers
SDL_GL_UpdateRects
SDL_GL_Lock
SDL_GL_Unlock
SDL_WM_SetCaption
SDL_WM_GetCaption
SDL_WM_SetIcon
SDL_WM_IconifyWindow
SDL_WM_ToggleFullScreen
SDL_WM_GrabInput
SDL_InitQuickDraw
" is not defined
4:51:49 PM ----- Done.
In other words - while it put out the libs, virtually every function in
them is not defined…
Okay, just for kicks, I ran Build on graywin. The readme mentions a rsrc
folder - none exists, though the files contained therein (referenced
from the binary SDL devel which in itself had problems) exist in the
src/main/somethingorother directory. Oh - and the graywin.makefile is
off - had to hack it to get it to work according to the README.MacOS -
:test:graywin.c = test/graywin.c - from the test directory it would look
test/test/graywin.c. Nope, that won’t work. I put :: in front of
everything that wanted to access the SDL root directory. Below
illustrates my changes (I had to substitute some characters so it would
email from Linux without looking odd - ff, @ and those dots).
Makefile for Apple MPW build environment (currently PPC only)
MAKEFILE = Makefile
MondoBuild = #{MAKEFILE} # Make blank to avoid rebuilds when makefile
is modified
SDL_INC = @
-i "::include:"
SymPPC =
ObjDirPPC = ::obj:
CFLAGS = {SDL_INC} {Sym*PPC}
OBJS = @
"{ObjDir*PPC}graywin.c.x"
LIBS = @
"::lib:SDLmain.o" “::lib:SDL”
This is used to build the application
graywin ff {MondoBuild} {OBJS}
PPCLink @
-o “{Targ}” {Sym*PPC} @
{OBJS} {LIBS} @
"{SharedLibraries}InterfaceLib" @
"{SharedLibraries}StdCLib" @
"{SharedLibraries}MathLib" @
"{PPCLibraries}StdCRuntime.o" @
"{PPCLibraries}PPCCRuntime.o" @
"{PPCLibraries}PPCToolLibs.o"
Rez -a -o {Targ} "::src:main:macos:SDL.r"
Rez -a -o {Targ} “::src:main:macos:SIZE.r”
“{ObjDir*PPC}graywin.c.x” f {MondoBuild} “::test:graywin.c”
{PPCC} “::test:graywin.c” -o {Targ} {CFLAGS}
Output from compiling graywin:
4:55:07 PM ----- Build of graywin.
4:55:07 PM ----- Analyzing dependencies.
4:55:08 PM ----- Executing build commands.
MrC "::test:graywin.c" -o ::obj:graywin.c.x -i "::include:"
PPCLink -o "graywin" "::obj:graywin.c.x" "::lib:SDLmain.o"
“::lib:SDL” “Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:InterfaceLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:StdCLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:SharedLibraries:MathLib”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:StdCRuntime.o”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:PPCCRuntime.o”
“Macintosh
HD:MPW-GM:MPW::Interfaces&Libraries:Libraries:PPCLibraries:PPCToolLibs.o”
Error: File “::lib:SDLmain.o”
Reference to unresolved symbol “.SDL_InitQuickDraw”
Error: File “::lib:SDLmain.o”
Reference to unresolved symbol “.SDL_putenv”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_Init”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_GetError”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_WaitEvent”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_WarpMouse”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_Quit”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_SetVideoMode”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_SetColors”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_LockSurface”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_UnlockSurface”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_UpdateRect”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_FillRect”
Error: File “::obj:graywin.c.x”
Reference to unresolved symbol “.SDL_UpdateRects”#
Unresolved external references:
.SDL_InitQuickDraw
.SDL_putenv
.SDL_Init
.SDL_GetError
.SDL_WaitEvent
.SDL_WarpMouse
.SDL_Quit
.SDL_SetVideoMode
.SDL_SetColors
.SDL_LockSurface
.SDL_UnlockSurface
.SDL_UpdateRect
.SDL_FillRect
.SDL_UpdateRects
Error: No output file generated
Error: Error 3034 while linking
Error: There were unresolved references
Fatal error:
PPCLink - Execution terminated!
MPW Shell - Execution of graywin.makeout terminated.
MPW Shell - Execution of BuildProgram terminated.
Ack. MPW seems to work fine, though there may be caveats because I’m
using MacOS 8.5 - however, I’ve downloaded the latest MPW. Latest OpenGL
(which I’m aching to test with SDL). Have no complaints from MPW itself.
So, am I looking in all the wrong places for help - or is there just no
conclusive documentation for building SDL apps on Mac? Is there anyone
out there that already ripped out their hair and finally got it set up
right that can give me advice? I’ve got no more hair to rip out…
It seems like Apple has already abandoned Classic MacOS in favor for
their OS-X. Virtually all the info on their website reflect this.
Frankly, with my little 266Mhz iMac system, OS 9 is about as far as I’m
willing to go and I’m happy with the 8.5 I have now.
Thanks,
Mike
–
http://dotfile.net/ - Dedicated to Open Source Software