I wanted to report that my efforts to use FPC, SDL, and OpenGL on Xcode 3.1 (OSX 10.5.6 on an iMac 3.02GHz) were successful. I didn't want to use Lazarus since I don't do Delphi (I'm an old BP 7 guy...) and I kind of like Xcode now.

It was a close call but these posts on the Lazarus forum:
http://forum.lazarus.freepascal.org/...p?topic=6192.0
helped a lot.

I used FPC 2.2.4RC1 and the (JEDI) SDL files >included< with that package. I downloaded SDL and other SDL libraries (TTF,Image etc.) and built them (./configure, make, sudo make install) and ended up with, among other versions, libSDL.a and libSDLmain.a in my /usr/local/lib directory. I fired up Xcode, chose New Project and selected the "FPC Standard Tool 2.2.0" from the Pascal template option. I right-clicked on my target app name and chose "add - Existing Frameworks...". The target info panel came up and I clicked the bottom left "+" button below the linked libraries pane, then the "Add Other..." on the next panel. I navigated to /System/Libary/Frameworks and double-clicked "Cocoa.framework" and entered it into my target. I did another "add Existing Frameworks..." and navigated to my /usr/local/lib and selected libSDL.a and libSDLmain.a and entered them into my target.

I converted some pure C code (a test I had written to stress OpenGL) into straight Pascal with no {$linklib...} compiler directives at all. Despite some weird warnings about unused vars (which were in fact used) and some bizarre behavior from some calls with "Random," it compiled and ran beautifully, both with debug and release versions under 10.4 and 10.5 SDKs.

So now I can use all my old code with a few changes for SDL and OpenGL, but still in Pascal! Now programming will be a joy again... Thanks to everyone involved in the FPC - SDL - Lazarus community. This is really great stuff. My pascal code ran nearly 90% of the speed of the pure C code!

--Paul