Hi Francesco,

On Friday 21 Jan 2011 16:20:51 Francesco Di Lorenzo wrote:
> Hi everyone,
> I've just finished reading Learning Perl by O'Really and I want to learn
> something that can give me something more pleasant to work on, something
> funny, I want to program some basic games like pong...
> For this I've found a book that introduces SDL, but I don't know how to
> install all the cpan modules (and other things) needed to run the code
> written in this book.
> I'm running Mac OS X 10.6.6 and I've run the terminal command "sudo cpan
> SDL" but this is not enough and I had some compilation error in some
> basilar script like the one down here.
> 
> This is the script:
> > #!/usr/bin/perl
> 
> use strict;
> 
> use warnings;
> 
> use SDL;
> 
> use SDLx::App;
> 
> > my $app = SDLx::App->new();
> > 
> > 
> > sleep(2);

You have extra ">" in the code that you've given.

> 
> And this is the compilation error shown in the terminal:
> 
> Can't locate SDL.pm in @INC (@INC contains:
> > /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level
> > /Library/Perl/Updates/5.10.0
> > /System/Library/Perl/5.10.0/darwin-thread-multi-2level
> > /System/Library/Perl/5.10.0
> > /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0
> > /Network/Library/Perl/5.10.0/darwin-thread-multi-2level
> > /Network/Library/Perl/5.10.0 /Network/Library/Perl
> > /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level
> > /System/Library/Perl/Extras/5.10.0 .) at ./script.pl line 4.
> 
> BEGIN failed--compilation aborted at ./script.pl line 4.
> 

Well, first of all, you seem to be missing SDL.pm from the include paths. 
Probably the installation wasn't successful. Another issue is that you are 
experimenting using the Mac OS X built in perl program, which is not a good 
idea. You should install your own perl VM on a different path and use that for 
development.

You may wish to try consultin the #sdl IRC channel on irc.perl.org with 
further problems ( irc://irc.perl.org/#sdl ).

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Chuck Norris can make the statement "This statement is false" a true one.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to