JEDI-SDL working on MacOS X

I have finally managed to iron out all the bugs involved putting together an XCode 2.4.x compatible project template that works with JEDI-SDL and FreePascal on MacOS X. A big thank-you goes out to Jonas Maebe for pointing me in the right direction. Ok the basic instructions are as follows...


1. Need 1 cup of MacOS X

2. An installation of XCode 2.4 which ships with Tiger, but can the latest version can be downloaded by registering here - . Note the current version of 2.4.1 and weighs in at 924MB, so I hope you have broadband. This will give you a DMG ( Disk Image ) that will self mount. Follow the installation instructions.

3. Download and install the SDL disk image for MacOS X from - Once this disk image has mounted you will find yourself in a folder with a Readme.txt a SDL.framework directory and a few other files.
To Install SDL:
Copy the SDL.framework to /Library/Frameworks
You can do the same thing for SDL_image, SDL_mixer, SDL_ttf and SDL_net.
/Library/Frameworks/ is the location for all private frameworks.
The standard OS frameworks are located in...

4. Download and install FreePascal for MacOS X from - I downloaded a 2.1.1 snapshot about a week ago, but note that this branch is under heavy development so is not considered stable. You can try using the more stable 2.0.4 release, but I cannot vouch for that. Again this should give you a *.dmg files that will mount instelf and in this case launch an installation. Follow the instructions and you should have a working FreePascal compiler for MasOS X at the end of it.

5. If the installation above went well you should now have some FreePascal project templates located at...
/Library/Application Support/Apple/Developer Tools/Project Templates/Pascal/
under which will be "FPC Standard Tool" and "FPC Carbon Application" project templates. Now download the JEDI-SDL 2D project template from
or the 3D project template from
Unzip the archived "FPC JEDI-SDL 2D" or "FPC JEDI-SDL 3D" folder at the same level as the previous FPC project templates.

6. Now start up XCode. Select "File->New Project". A New Project wizard should appear listing all the project templates available. Scroll down the list until you get to "Pascal". Under this node you should see the 2 FPC Project Templates and the JEDI-SDL 2D project template. Select "FPC JEDI-SDL 2D" and click "Next". Now enter a Project Name and Directory. Note : If the directory does not exist, it will be created. When you happy click finish the newly created project will be opened and ready for editing within XCode.

7. Click the "Build and Go" icon and the compilation process will begin. Once completed ( it's a bit slower that Delphi ), you should see the JEDI-SDL logo ( thanks Jason ) bouncing around a native MacOS X window.

8. Hack this project around to get your baby working on MacOS X.


This is the simplest way to get JEDI-SDL and XCode working together. A more indepth tutorial of how to create the project from scratch would include a lot of arcane magic and work arounds which Jonas has already had the misfortune of experiencing, hence why project templates are provided as a starting point when using XCode.

Any feedback or corrections welcome.

Posted by Dominique Louis 2006-11-24