Okay, this has nothing to do with Lazarus and everything to do with FPC - or rather, the FPC documentation and the current state of FPC and SDL.
I discovered that FPC already _includes_ the SDL units, so you don't need the JEDI 1.0RC2 .zip, which crashes, presumably because the SDM_main routine is not getting called.
The FPC sdl.pas is more recent than the 1.0RC2 sdl.pas. Look in:
/usr/local/share/fpcsrc/packages/sdl/src
In the older sdl.pas, we see this:
{$IFDEF DARWIN}
SDLLibName = 'libSDL-1.2.0.dylib';
In the newer sdl.pas included with FPC, we see this:
{$IFDEF DARWIN}
SDLLibName = 'libSDL-1.2.0.dylib';
{$linklib libSDL-1.2.0}
{$linklib SDLmain}
{$linkframework Cocoa}
{$PASCALMAINNAME SDL_main}
Those extra lines is a good sign that something is up. In neither case are we linking with the indicated library - instead, we're using the SDL.framework. I believe the SDLLibName is ignored since it's only used in the external part of the function declarations. And the first $linklib can be taken out.
However, the 2nd $linklib points to a non-existent file, at least I can't find it on my system. This is where the SDL_main routine is and I suspect this is needed to properly initialize things.
Using otool -Tv SDL on the library inside the SDL.framework we see that it doesn't export any routine with that name. So where is this function?
Good question. The wiki documentation was clearly written without the SDL.framework in mind and needs to be updated.
Here's a related thread from May 5:
http://www.hu.freepascal.org/lists/fpc-devel/2008-May/013675.htmlNote that FPC's sdl.pas is stamped May 31. I suspect that Jonas updated sdl.pas for FPC but didn't update any documentation. And without a working example (examples and tests are both empty in packages/sdl) I don't know how to go beyond this, but certainly we're now in the ballpark.
Welcome to open source if you haven't run into this sort of confusion before.
Thanks.
-Phil