Setting up Perl SDL 2.4
Friday, April 9, 2010 at 5:59PM Because of the way SDL works, it takes some special tricks to get it working correctly with Perl. For some reason that's beyond my knowing, it's extra difficult on Mac OSX. These steps worked for me, but feel free to email me if you're having trouble and I'll see what I can do.
- Install the SDL library version 1.2. This is most easily done via Macports.
- Install the newest version of the SDL perl module using CPAN. There is a Macports module for this, but it hasn't been updated to the most recent version.
- In terminal, open up the build directory for the SDL module. It should be something like ~/.cpan/build/SDL-2.4-******/.
- Now execute the command: sudo perl Build bundle
- You should have now a folder called SDLPerl.app in the same directory.
- Copy SDLPerl.app wherever seems convenient to you.
- To run programs, you have to specifically pass in all the folders where your sources are contained. This includes the directory that you execute in.
- For example: PERL5LIBS=$PERL5LIBS:/a/b/c:/a/b/c/lib /path/to/SDLPerl.app/Contents/MacOS/SDLPerl myscript.pl
I'm sure there's a better way to do this, if you have any suggestions, please let me know.
Robert Ward |
1 Comment | 
