in reply to Re^2: WANTED: Simple & portable graphics to use with Perl
in thread WANTED: Simple & portable graphics to use with Perl

Why doesn't the SDL work in XP? How didn't you succeed? Is it impossible or did you just give up?

-Paul

  • Comment on Re^3: WANTED: Simple & portable graphics to use with Perl

Replies are listed 'Best First'.
Re^4: WANTED: Simple & portable graphics to use with Perl
by jds17 (Pilgrim) on Jun 03, 2008 at 12:03 UTC
    I just tried a few hours, so I would not say it is impossible. Right now I am not at home at my computer, but I remember an error message "cannot find sdl-config" when trying to install the SDL module from CPAN. I did not find which configuration was missing. The next step, of course, would be to look at the module source, but I was already a bit tired of SDL at that point. Do you have a suggestion?

    By the way, (on Windows XP) I am using Strawberry Perl 5.10.0.1.

    José

      You'll need the sdl-config in your path. ExtUtils::PkgConfig will use it to configure your libs and deps. It's pure magic really. But you'll definitely need the libsdl devkit installed... probably in a path with no spaces (unless your skills are more advanced than mine). I find win32 a bit developer unfriendly, but it can be done if you get all the right things installed.

      -Paul

        Paul, I just installed the SDL module using MinGW (using the instructions at http://www.netadelica.com/coding/sdl/install.html).

        Since sdl-config is a shell script to be meant to be executed e.g. by the MSys shell, I created two links sdl-config-libs, sdl-config-cflags with targets C:\Programme\msys\1.0\bin\sh.exe sdl-config.sh --libs resp. C:\Programme\msys\1.0\bin\sh.exe sdl-config.sh --cflags which I then referenced in the Build.PL file of the SDL module.

        I then ran into the error that the environment variable LIBS was not set, so I set it to point to C:\Programme\MinGW\lib, where I had placed the SDL libraries.

        Next error: Can't use an undefined value as an ARRAY reference at make/lib/SDL/Build.pm line 154. So I then ran the Build.PL under the debugger but could not yet solve the problem.

        So, you see, it isn't at all straightforward (not that anybody has claimed it...), fiddling around with Build.PL is not how installing a module should work. I am not blaming anyone for this and maybe I invest a few hours trying to sort it out and share my experiences afterward. But it is really quite painful and I would really like to have a simpler solution working on Windows, too.