SDL on Classic MacOS?!?!?!?

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 =
ObjDir
PPC = ::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

It’s certainly possible to use SDL on Classic MacOS.

For a long time I was programming SDL with MacOS 8.6.

However, I did not compile the library myself. I just downloaded
the compiled package from the SDL site.

You are right to use MPW though - my problem for a long time was
that CodeWarrior wasn’t cooperating.

You may want to try downloading the pre-built SDL if you don’t need
to make any modifications and it SHOULD work. Also, you might try
upgrading OS 9, or at least 8.6 if you still can’t get it working,
because
it worked for me on 8.6.

-Randall

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long then
the entire system just locked down. Ouch - twice. I have a habit of
compiling as much of everything I can on Linux and I was following that
habit after the binary devel locked up the system. I figured either I
got a corrupt SDL.r file, or that I goofed up the installation - so I
went with the good ol’ “compile it myself” routine and hoped I could
fill in the holes in the README.MacOS. Not.

You put the GL headers in the CIncludes, right? And the libraries in the
Shared Libraries folder? Did you also do the same with SDL? All includes
in the CIncludes and the libs in the Shared Libraries folder? It’d be
nice if there was a map or some documentation for this…At least with
Unix the directories for the stuff is clearcut and easy and there’s more
documentation than you can shake a stick at. If I can figure all this
out, perhaps I can put out a Howto…unless there’s already one?

Thanks,
Mike

Randall Leeds wrote:> It’s certainly possible to use SDL on Classic MacOS.

For a long time I was programming SDL with MacOS 8.6.

However, I did not compile the library myself. I just downloaded
the compiled package from the SDL site.

You are right to use MPW though - my problem for a long time was
that CodeWarrior wasn’t cooperating.

You may want to try downloading the pre-built SDL if you don’t need
to make any modifications and it SHOULD work. Also, you might try
upgrading OS 9, or at least 8.6 if you still can’t get it working,
because
it worked for me on 8.6.

-Randall


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long then
the entire system just locked down. Ouch - twice. I have a habit of
compiling as much of everything I can on Linux and I was following that
habit after the binary devel locked up the system. I figured either I
got a corrupt SDL.r file, or that I goofed up the installation - so I
went with the good ol’ “compile it myself” routine and hoped I could
fill in the holes in the README.MacOS. Not.

.r files need to have Mac line endings, this might be the cause of the
crash.

You put the GL headers in the CIncludes, right? And the libraries in the
Shared Libraries folder? Did you also do the same with SDL? All includes
in the CIncludes and the libs in the Shared Libraries folder? It’d be
nice if there was a map or some documentation for this…At least with
Unix the directories for the stuff is clearcut and easy and there’s more
documentation than you can shake a stick at. If I can figure all this
out, perhaps I can put out a Howto…unless there’s already one?

I have compiled many apps on Mac OS, but I was always doing it with
CodeWarrior and with only trivial experience with MPW. I am writing a
tutorial for SDL on MacOS ala CodeWarrior, but until now I wasn’t going to
explain how SDL should be set up with MPW. I plan to investigate this and
make this part of the tutorial. I am hoping to have the tutorial up on
idevgames.com this month.

Cheers,
DarrellOn Tue, 1 Jan 2002, Mike Vanecek wrote:

I would be forever in your debt for the tutorial. Well, maybe not
forever… If the list doesn’t mind, could you post the URL when you
have it up please? I’ll open the .r file and see - I dl’d it and
unpacked it from the iMac though - if the lines were ended on a Mac and
packed, could serving the sit file from a Unix server possibly affect
that? Perhaps it could stand to be doublechecked… it is the latest
version of SDL_devel… I am still troubled that I can’t get it to build
successfully. I have to be missing something… I kinda have this
outlook - if I can’t compile the library, then how can I compile
programs against it - I’d like to find out why it’s not building
correctly and learn from it… It’s easy to dl the binary, but more
educational to compile the source…and then figure out where everything
goes in the MPW’s subdirectories so I don’t need to keep the SDL source
directory hanging around.

Codewarrior is the reason that I’ve previously not been keen to program
on Apple. I simply didn’t know about MPW, and couldn’t afford
Codewarrior. Even now with a business and three properties, I’m still
living hand to mouth - I feel lucky to have aquired the iMac - which I
hope to upgrade to 256MB RAM and a 20Gb harddrive. So, MPW is a windfall
for me. Kinda like when I discovered GCC through DJGPP and then Linux…
Don’t need anything fancier than that - GCC ‘n’ family and a good editor
and the same for MPW. Well, CVS is nice. Anyway, it tickles my wife to
see all my Linux SDL stuff working on her Windows computer - now for it
to work on the Mac too…

Cheers,
Mike

Darrell Walisser wrote:>On Tue, 1 Jan 2002, Mike Vanecek wrote:

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long then
the entire system just locked down. Ouch - twice. I have a habit of
compiling as much of everything I can on Linux and I was following that
habit after the binary devel locked up the system. I figured either I
got a corrupt SDL.r file, or that I goofed up the installation - so I
went with the good ol’ “compile it myself” routine and hoped I could
fill in the holes in the README.MacOS. Not.

.r files need to have Mac line endings, this might be the cause of the
crash.

You put the GL headers in the CIncludes, right? And the libraries in the
Shared Libraries folder? Did you also do the same with SDL? All includes
in the CIncludes and the libs in the Shared Libraries folder? It’d be
nice if there was a map or some documentation for this…At least with
Unix the directories for the stuff is clearcut and easy and there’s more
documentation than you can shake a stick at. If I can figure all this
out, perhaps I can put out a Howto…unless there’s already one?

I have compiled many apps on Mac OS, but I was always doing it with
CodeWarrior and with only trivial experience with MPW. I am writing a
tutorial for SDL on MacOS ala CodeWarrior, but until now I wasn’t going to
explain how SDL should be set up with MPW. I plan to investigate this and
make this part of the tutorial. I am hoping to have the tutorial up on
idevgames.com this month.

Cheers,
Darrell


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

You’re not required to put the libraries anywhere. I used SDL
on classic for 1.0 and 1.1, not the most recent release.

You put the libraries and the headers wherever you want but
make sure to pop open the Makefile. The easiest thing to do
(or something like that) in one of the menus and set up an application
like that. Also, make sure that you Get Info on the app or set it up
some other way so that you give your app plenty of RAM if you get it
to compile.

My directory structure was this when I did my building, maybe the SDL
libs have changed:
Project Dir
Libraries
SDL
SDLmain.o
Headers
All The SDL Headers

Then just pop open the Makefile, which if you stare at it long enough
you can figure out how it all works, and add a couple lines along with
all
the other libraries to link SDL and SDLmain.o.
Also, link the opengl libraries, I think they all start with OpenGL
and should be in the Shared Libraries folder with the MPW release,
either that or download the SDK from Apple.

I apologize if all of this is useless though, because my experience
with SDL on MacOS Classic is 1.0-1.1. By the time 1.2 came out I
had upgraded to X.

-Randallfrom my experience was to just use the Create Build Commands

On Tuesday, January 1, 2002, at 09:18 PM, Mike Vanecek wrote:

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long then
the entire system just locked down. Ouch - twice. I have a habit of
compiling as much of everything I can on Linux and I was following that
habit after the binary devel locked up the system. I figured either I
got a corrupt SDL.r file, or that I goofed up the installation - so I
went with the good ol’ “compile it myself” routine and hoped I could
fill in the holes in the README.MacOS. Not.

You put the GL headers in the CIncludes, right? And the libraries in
the Shared Libraries folder? Did you also do the same with SDL? All
includes in the CIncludes and the libs in the Shared Libraries folder?
It’d be nice if there was a map or some documentation for this…At
least with Unix the directories for the stuff is clearcut and easy and
there’s more documentation than you can shake a stick at. If I can
figure all this out, perhaps I can put out a Howto…unless there’s
already one?

Thanks,
Mike

Randall Leeds wrote:

It’s certainly possible to use SDL on Classic MacOS.

For a long time I was programming SDL with MacOS 8.6.

However, I did not compile the library myself. I just downloaded
the compiled package from the SDL site.

You are right to use MPW though - my problem for a long time was
that CodeWarrior wasn’t cooperating.

You may want to try downloading the pre-built SDL if you don’t need
to make any modifications and it SHOULD work. Also, you might try
upgrading OS 9, or at least 8.6 if you still can’t get it working,
because
it worked for me on 8.6.

-Randall


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Excellent. That helps alot. I got the OGL SDK core and put the
appropriate files in what seemed to be the appropriate MPW
subdirectories - *.h in the CIncludes which were populated with *.h
files (and which eliminated that GL missing error when building SDL) and
the libs in the shared libs directory (by reading another error that
pointed to it). I was thinking of doing the same with SDL so I would
have the same path with all my libraries and includes - but I’ll give
your recommendation a whirl. It’d be nice to have a universal location
for headers and libraries on the Mac to make the projects easier to
share though. Has OS-X implimented a more Unix like standardization of
locations? Like /usr/lib and /usr/include and so forth?

I am amused by a workaround that the OGL headers implimented to
facilitate more crossplatform compatibility with Mac - they named “GL.h”
“GL/GL.h” with the forward slash so that “#include <GL/GL.h>” would
resolve correctly. Perhaps we can take a cue and do something similar -
copy “SDL.h” to “SDL/SDL.h” so that either/or would be available. The
CIncludes and Shared Libraries directories seem to be the logical homes
for the SDL resources - that way your make files are simpler and don’t
have to be edited by other Mac users with their own folder placement -
perhaps this can be recommended in documentation?

Cheers,
Mike

Randall Leeds wrote:> You’re not required to put the libraries anywhere. I used SDL

on classic for 1.0 and 1.1, not the most recent release.

You put the libraries and the headers wherever you want but
make sure to pop open the Makefile. The easiest thing to do
from my experience was to just use the Create Build Commands
(or something like that) in one of the menus and set up an application
like that. Also, make sure that you Get Info on the app or set it up
some other way so that you give your app plenty of RAM if you get it
to compile.

My directory structure was this when I did my building, maybe the SDL
libs have changed:
Project Dir
Libraries
SDL
SDLmain.o
Headers
All The SDL Headers

Then just pop open the Makefile, which if you stare at it long enough
you can figure out how it all works, and add a couple lines along with
all
the other libraries to link SDL and SDLmain.o.
Also, link the opengl libraries, I think they all start with OpenGL
and should be in the Shared Libraries folder with the MPW release,
either that or download the SDK from Apple.

I apologize if all of this is useless though, because my experience
with SDL on MacOS Classic is 1.0-1.1. By the time 1.2 came out I
had upgraded to X.

-Randall

On Tuesday, January 1, 2002, at 09:18 PM, Mike Vanecek wrote:

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long
then the entire system just locked down. Ouch - twice. I have a habit
of compiling as much of everything I can on Linux and I was following
that habit after the binary devel locked up the system. I figured
either I got a corrupt SDL.r file, or that I goofed up the
installation - so I went with the good ol’ "compile it myself"
routine and hoped I could fill in the holes in the README.MacOS. Not.

You put the GL headers in the CIncludes, right? And the libraries in
the Shared Libraries folder? Did you also do the same with SDL? All
includes in the CIncludes and the libs in the Shared Libraries
folder? It’d be nice if there was a map or some documentation for
this…At least with Unix the directories for the stuff is clearcut
and easy and there’s more documentation than you can shake a stick
at. If I can figure all this out, perhaps I can put out a
Howto…unless there’s already one?

Thanks,
Mike

Randall Leeds wrote:

It’s certainly possible to use SDL on Classic MacOS.

For a long time I was programming SDL with MacOS 8.6.

However, I did not compile the library myself. I just downloaded
the compiled package from the SDL site.

You are right to use MPW though - my problem for a long time was
that CodeWarrior wasn’t cooperating.

You may want to try downloading the pre-built SDL if you don’t need
to make any modifications and it SHOULD work. Also, you might try
upgrading OS 9, or at least 8.6 if you still can’t get it working,
because
it worked for me on 8.6.

-Randall


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Has OS-X implimented a more Unix like standardization of locations?
Like /usr/lib and /usr/include and so forth?

Indeed it has! In fact, there are a /usr/lib and /usr/include folders!
MacOS X installs as an option at install time the BSD Unix Subsystem
which is recommended for developers. It contains all the basic
development
tools you find on your familiar linux. However, if you want you can also
use ProjectBuilder which is a very nice graphical development environment
that apple provides for free if you register with the Apple Developer
Connection
at their website. But if makefiles are what you like, you’re welcome to
use them.

In fact, it’s rather nice running MacOS X because when things don’t say
that they
work on MacOS, but that do do work on Linux, you can often download them
anyway
and compile them! YAY!

There’s even an XonX project that helps users set up XFree86 to run
along with OSX.
I did some tooling with it and got it to work, but slowly. I had GNOME
running, sort of :slight_smile:

MacOS X opens a whole new world for mac users.

-RandallOn Wednesday, January 2, 2002, at 01:11 AM, Mike Vanecek wrote:

I am amused by a workaround that the OGL headers implimented to
facilitate more crossplatform compatibility with Mac - they named
"GL.h" “GL/GL.h” with the forward slash so that "#include <GL/GL.h>"
would resolve correctly. Perhaps we can take a cue and do something
similar - copy “SDL.h” to “SDL/SDL.h” so that either/or would be
available. The CIncludes and Shared Libraries directories seem to be
the logical homes for the SDL resources - that way your make files are
simpler and don’t have to be edited by other Mac users with their own
folder placement - perhaps this can be recommended in documentation?

Cheers,
Mike

Randall Leeds wrote:

You’re not required to put the libraries anywhere. I used SDL
on classic for 1.0 and 1.1, not the most recent release.

You put the libraries and the headers wherever you want but
make sure to pop open the Makefile. The easiest thing to do
from my experience was to just use the Create Build Commands
(or something like that) in one of the menus and set up an application
like that. Also, make sure that you Get Info on the app or set it up
some other way so that you give your app plenty of RAM if you get it
to compile.

My directory structure was this when I did my building, maybe the SDL
libs have changed:
Project Dir
Libraries
SDL
SDLmain.o
Headers
All The SDL Headers

Then just pop open the Makefile, which if you stare at it long enough
you can figure out how it all works, and add a couple lines along with
all
the other libraries to link SDL and SDLmain.o.
Also, link the opengl libraries, I think they all start with OpenGL
and should be in the Shared Libraries folder with the MPW release,
either that or download the SDK from Apple.

I apologize if all of this is useless though, because my experience
with SDL on MacOS Classic is 1.0-1.1. By the time 1.2 came out I
had upgraded to X.

-Randall

On Tuesday, January 1, 2002, at 09:18 PM, Mike Vanecek wrote:

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long
then the entire system just locked down. Ouch - twice. I have a habit
of compiling as much of everything I can on Linux and I was following
that habit after the binary devel locked up the system. I figured
either I got a corrupt SDL.r file, or that I goofed up the
installation - so I went with the good ol’ "compile it myself"
routine and hoped I could fill in the holes in the README.MacOS. Not.

You put the GL headers in the CIncludes, right? And the libraries in
the Shared Libraries folder? Did you also do the same with SDL? All
includes in the CIncludes and the libs in the Shared Libraries
folder? It’d be nice if there was a map or some documentation for
this…At least with Unix the directories for the stuff is clearcut
and easy and there’s more documentation than you can shake a stick
at. If I can figure all this out, perhaps I can put out a
Howto…unless there’s already one?

Thanks,
Mike

Randall Leeds wrote:

It’s certainly possible to use SDL on Classic MacOS.

For a long time I was programming SDL with MacOS 8.6.

However, I did not compile the library myself. I just downloaded
the compiled package from the SDL site.

You are right to use MPW though - my problem for a long time was
that CodeWarrior wasn’t cooperating.

You may want to try downloading the pre-built SDL if you don’t need
to make any modifications and it SHOULD work. Also, you might try
upgrading OS 9, or at least 8.6 if you still can’t get it working,
because
it worked for me on 8.6.

-Randall


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Well - I re-dl’ed everything via IE and even via Linux through netatalk
and still had the same problem. I opened and resaved the SDL.r file and
actually got graywin to compile (and run) from the devel distribution,
but everything else complained of SDL.r Line Too Long. If I let it sit,
it would unlock and start spooling through the lines with the same error
message - it got to over 15,000 lines once before I got it to stop -
strange because SDL.r doesn’t have 15,000 lines. Also, I opened it using
the MPW and it didn’t look as bad as when I opened it in the note-pad
lookalike. (Can’t remember and I’m currently re-initializing my disk).
The comments where till extremely garbled. I also dl’ed everything from
1.1.8 - source, runtime and devel - same problem compiling SDL, and same
quirk when trying to compile something from devel. Since this is a
critical problem - if it were SDL’s problem it would have been addressed
and fixed. So I have to assume that something here isn’t right. The
computer is second hand, and I just now got the restore disks (they had
also purchased OS9 which I’ll promptly install after the restore) - so
I’m just going to wipe everything off, restore the system, install OS9
and then re-dl everything afresh…

Thanks for your help and patience - I hope the reload and upgrade clears
out whatever was giving me problems…

Cheers,
Mike

Randall Leeds wrote:> Just a little thing I thought you might get a kick out of after

reading your last post.

They make gcc as a MPW tool. I never got around to using it
and I don’t know how to, but look into it, do a search on the web.

-Randall

On Tuesday, January 1, 2002, at 11:33 PM, Mike Vanecek wrote:

I would be forever in your debt for the tutorial. Well, maybe not
forever… If the list doesn’t mind, could you post the URL when you
have it up please? I’ll open the .r file and see - I dl’d it and
unpacked it from the iMac though - if the lines were ended on a Mac
and packed, could serving the sit file from a Unix server possibly
affect that? Perhaps it could stand to be doublechecked… it is the
latest version of SDL_devel… I am still troubled that I can’t get it
to build successfully. I have to be missing something… I kinda have
this outlook - if I can’t compile the library, then how can I compile
programs against it - I’d like to find out why it’s not building
correctly and learn from it… It’s easy to dl the binary, but more
educational to compile the source…and then figure out where
everything goes in the MPW’s subdirectories so I don’t need to keep
the SDL source directory hanging around.

Codewarrior is the reason that I’ve previously not been keen to
program on Apple. I simply didn’t know about MPW, and couldn’t afford
Codewarrior. Even now with a business and three properties, I’m still
living hand to mouth - I feel lucky to have aquired the iMac - which I
hope to upgrade to 256MB RAM and a 20Gb harddrive. So, MPW is a
windfall for me. Kinda like when I discovered GCC through DJGPP and
then Linux… Don’t need anything fancier than that - GCC ‘n’ family
and a good editor and the same for MPW. Well, CVS is nice. Anyway, it
tickles my wife to see all my Linux SDL stuff working on her Windows
computer - now for it to work on the Mac too…

Cheers,
Mike

Darrell Walisser wrote:

On Tue, 1 Jan 2002, Mike Vanecek wrote:

I’ll give that a go again - however, when compiling graywin from the
SDL_devel I got an error that the first line of SDL.r was too long then
the entire system just locked down. Ouch - twice. I have a habit of
compiling as much of everything I can on Linux and I was following that
habit after the binary devel locked up the system. I figured either I
got a corrupt SDL.r file, or that I goofed up the installation - so I
went with the good ol’ “compile it myself” routine and hoped I could
fill in the holes in the README.MacOS. Not.

.r files need to have Mac line endings, this might be the cause of the
crash.

You put the GL headers in the CIncludes, right? And the libraries in
the
Shared Libraries folder? Did you also do the same with SDL? All
includes
in the CIncludes and the libs in the Shared Libraries folder? It’d be
nice if there was a map or some documentation for this…At least with
Unix the directories for the stuff is clearcut and easy and there’s
more
documentation than you can shake a stick at. If I can figure all this
out, perhaps I can put out a Howto…unless there’s already one?

I have compiled many apps on Mac OS, but I was always doing it with
CodeWarrior and with only trivial experience with MPW. I am writing a
tutorial for SDL on MacOS ala CodeWarrior, but until now I wasn’t
going to
explain how SDL should be set up with MPW. I plan to investigate this
and
make this part of the tutorial. I am hoping to have the tutorial up on
idevgames.com this month.

Cheers,
Darrell


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


http://dotfile.net/ - Dedicated to Open Source Software

Excellent. That helps alot. I got the OGL SDK core and put the
appropriate files in what seemed to be the appropriate MPW
subdirectories - *.h in the CIncludes which were populated with *.h
files (and which eliminated that GL missing error when building SDL) and
the libs in the shared libs directory (by reading another error that
pointed to it). I was thinking of doing the same with SDL so I would
have the same path with all my libraries and includes - but I’ll give
your recommendation a whirl. It’d be nice to have a universal location
for headers and libraries on the Mac to make the projects easier to
share though. Has OS-X implimented a more Unix like standardization of
locations? Like /usr/lib and /usr/include and so forth?

I am amused by a workaround that the OGL headers implimented to
facilitate more crossplatform compatibility with Mac - they named “GL.h”
“GL/GL.h” with the forward slash so that “#include <GL/GL.h>” would
resolve correctly. Perhaps we can take a cue and do something similar -
copy “SDL.h” to “SDL/SDL.h” so that either/or would be available. The
CIncludes and Shared Libraries directories seem to be the logical homes
for the SDL resources - that way your make files are simpler and don’t
have to be edited by other Mac users with their own folder placement -
perhaps this can be recommended in documentation?

The code should be including “SDL.h” for this very reason.

I use MPW exclusively when building SDL on my iBook (also 266 MHz),
and I haven’t had any problems (obviously). I have updated my system
to the latest version of MacOS classic without any problems.

The recent builds of SDL_mixer and SDL_image were built with this setup.

Here’s what I did:
Step 1: Downlaod the SDL-devel archive for MacOS classic
Step 2: Unpack it on the desktop
Step 3: Download the source archive for SDL_mixer and SDL_image
Step 4: Unpack them on the desktop
Step 5: Unpack the MPWmake.sea.hqx archives in the respective directories
Step 6: Move the contents of the new “MPWmake Folder” one level up
Step 7: Edit the .make files to make sure that the path to SDL is correct
Step 8: Set the current directory in MPW to the SDL_image directory
Step 9: Build (command-B) “SDL_image”, then "showimage"
Step 10: Copy the SDL shared library from the SDL lib directory to SDL_image/
Step 11: Copy an image to the SDL_image directory.
Step 12: Hold down the command key and double-click showimage
Step 13: Type the name of the image preceded by a colon in the entry box…
For example: :sample.bmp
This tells showimage to load sample.bmp in the current directory.
Step 14: Marvel at Sam’s wonderous coding abilities. :wink:
Step 15: Do similar things for the SDL_mixer directory.

Whenever I’m creating an MPW makefile for a new project, I usually copy
one from SDL_image and modify it to suit my needs. I often copy it to a
UNIX system so I can use vi to quickly replicate the necessary build lines.
(If there’s a way to set up default build rules like UNIX make does, please
let me know!)

I hope that helps…

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I re-initialized the disk on the Rev-C iMac, upgraded to MacOS 9.0 and
reinstalled everything and went into SDL-devel and the test progs
compiled with nary a problem. I can’t say whether it was a problem with
the old MacOS 8.5, or whatever the previous owner had done to it. I plan
on upgrading the RAM to 512Mb (from 96 now) and the harddrive to a 40 or
60 Gb and drool over all the neat SDL stuff on Mac.

One Q - the testsprite application has a slight hickup just as it starts
up before resuming animation - it starts, stops briefly and then
continues. An app I’ve been putting together to teach myself SDL (using
some of this and some of that) also does the same thing. I’m using the
basic SDL_Getticks() function on my learning application. Could the Mac
be hesitating to do the math once it all starts, or is there something
else I should be aware of (Mac quirks like Endian stuff or math stuff?).
Another possibility is that it takes an extra moment to load the event
functions which are after all the images and animations are loaded…

Thanks,
Mike–
http://dotfile.net/ - Dedicated to Open Source Software