Trag has asked for the wisdom of the Perl Monks concerning the following question:

When I try to run a script using SDL_Perl, I get a pop up box that says "This application has failed to start because SDL_gfx.dll was not found" I am unable to find that DLL, and I think it's non-existant. I also get a bunch of messages in the console saying: Can't load 'C:/Perl/site/lib/auto/SDL_perl/SDL_perl.dll' for module SDL_perl: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 229. at C:/Perl/site/lib/SDL.pm line 13
Compilation failed in require at C:/Perl/site/lib/SDL.pm line 13.
BEGIN failed--compilation aborted at C:/Perl/site/lib/SDL.pm line 13.
Compilation failed in require at C:/Perl/site/lib/SDL/App.pm line 10.
BEGIN failed--compilation aborted at C:/Perl/site/lib/SDL/App.pm line 10.
Compilation failed in require at C:\myperl\sdl\screen.pl line 6.
BEGIN failed--compilation aborted at C:\myperl\sdl\screen.pl line 6.

This is the code I'm trying to run. It's copied directly from the tutorial.

#!usr/bin/perl use warnings; use strict; use SDL::App; use SDL::Color; my $app = SDL::App->new( -width => 640, -height => 480, -depth => 16, ); my $color = SDL::Color->new( -r => 0x00, -g => 0x00, -b => 0xff, ); $app->fill( $rect, $color ); $app->update( $rect );


I do have the SDL.dll file, and last time I had this installed it worked fine.

Thanks


our @item = reverse (114, 101, 107, 99, 97, 104, 32, 108, 114, 101, 80, 32, 114, 101, 104, 116, 111, 110, 97, 32, 116, 115, 117, + 74); local $my = reverse ")meti@\ ,rhc (pam tnirp";eval $my;

Replies are listed 'Best First'.
Re: Help with SDL-Perl for Windows
by BrowserUk (Patriarch) on May 24, 2004 at 15:22 UTC

    The error message is telling you that the dll is not located where perl is expecting it to be. That means that the module was not correctly installed.

    How did you install the module?


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
      I used the ExtUtils::Install module as per Crazyinsomniac's instructions here. I didn't use PPM because Crazyinsomniac's version didn't seem to come with a ppd file. The .ppd link on the page was just a string of text about the module.
      By the way, I forgot to mention that the dll brought up by the Perl interpreter (not the one in the error window) was exactly where it was supposed to be, in C:\perl\site\lib\auto\sdl_perl.


      our @item = reverse (114, 101, 107, 99, 97, 104, 32, 108, 114, 101, 80, 32, 114, 101, 104, 116, 111, 110, 97, 32, 116, 115, 117, + 74); local $my = reverse ")meti@\ ,rhc (pam tnirp";eval $my;
        I used the ExtUtils::Install module as per Crazyinsomniac's instructions here.
        Why did you ignore the rest of the instructions?
        I didn't use PPM because Crazyinsomniac's version didn't seem to come with a ppd file. The .ppd link on the page was just a string of text about the module.
        You are wrong
        C:\>GET http://crazyinsomniac.perlmonk.org/perl/ppm/5.8/SDL_Perl.ppd <SOFTPKG NAME="SDL_Perl" VERSION="2,1,0,0"> <TITLE>SDL_Perl</TITLE> <ABSTRACT>Simple DirectMedia Layer for Perl</ABSTRACT> <AUTHOR>David J. Goehrig &lt;DGOEHRIG@cpan.org&gt;</AUTHOR> <IMPLEMENTATION> <INSTALL EXEC="PPM_PERL" HREF="http://crazyinsomniac.perlmonk. +org/perl/ppm/scripts/install_sdl">install_sdl</INSTALL> <PERLCORE VERSION="5,008000,0,0" /> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="SDL_Perl-2.1.0.tar.gz" /> </IMPLEMENTATION> </SOFTPKG> C:\>

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

        I followed your link to Crazyinsomniacs repository and found that right below the SDL.gz file, there is a .ppd file.

        SDL_Perl-2.1.0.tar.gz 139,279 16:27:42 20-Apr-2004 SDL_Perl.ppd [ C K ] 572 13:05:39 20-Apr-2004

        However, I'm not sure that it will help as SDL_perl.dll has dependancy upon 6 other .dlls that do not appear in the .gz file. SDL_GFX.dll, SDL_IMAGE.dll, SDL_MIXER.dll, SDL_NET.dll, SDL_TTF.dll and SMPEG.dll.

        I can only assume that these form some part of an independant package or more likely C-library, that you will need to locate, download and install on your system.

        Having never used SDL, I can't help further. You'd best hope that CrazyInsomniac will step in here:0


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "Think for yourself!" - Abigail