Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Cannot find SDL library with PPM

by Anonymous Monk
on Feb 01, 2020 at 14:18 UTC ( #11112227=perlquestion: print w/replies, xml ) Need Help??

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

Hi, i want to develop a game with SDL, but the only thing i can find with the Perl Package Manager is Alien-SDL. Is this the same thing because i saw some sample code that uses statements like 'use SDL::'. So i cant use those those it seems. Hope you can help.

Replies are listed 'Best First'.
Re: Cannot find SDL library with PPM
by Marshall (Abbot) on Feb 01, 2020 at 23:28 UTC
    I have no idea what Alien-SDL is. I don't do game development. First step would be to just use PPM to download what it has, run some code and see what happens. You will learn what libs are missing. Then use PPM to download the cpan module. Use that to download and install a cpan module into your AS installation. I did that recently with a different module and it worked fine. Of course Google and Cpan searches are your friend.

    Active State build status for Alien-SDL download and read the docs. It is common for big modules to have submodules, Tk::Button, etc. Could be that your sample code will work, however also sounds like you are in way over your head because game programming can get very complicated very quickly.

Re: Cannot find SDL library with PPM
by Anonymous Monk on Feb 03, 2020 at 14:59 UTC

    Yes, I downloaded them all with force and it is working. I had to set the path variable to: 'C:\Perl\site\bin\SDL' but i managed to do that. Thank you all, especially mr.syphilis, I could never have done this on my own.

      I downloaded them all with force

      Thanks for confirming ... I remember now that with modules that hadn't been updated in a while, the recommended way was to use --force.
      This was needed because each package contained it's own copies of a couple of gcc dlls upon which each package depended.
      I eventually hit upon a better method that removed the need for --force, but not all packages were updated to benefit from that improvement.

      Cheers,
      Rob
Re: Cannot find SDL library with PPM
by Anonymous Monk on Feb 01, 2020 at 16:47 UTC

    What to do with the Alien-SDL module...? The documentation isn't very helpful and i just red a tutorial that clearly states that Alien-SDL was the thing to download. So what is it for? It remains a mystery.

Re: Cannot find SDL library with PPM
by Anonymous Monk on Feb 02, 2020 at 07:46 UTC

    I downloaded Alien::SDL and i found an ,what seems to be, excellent tutorial. But all examples start with :'use SDL' and they don't work because i don't have that module. I tried downloading the SDL module without the help of PPM but it failed to install.

      If your perl version is between 5.10.0 and 5.24.x, then add http://www.sisyphusion.tk/ppm/ to your repo list and run simply:
      ppm install SDL
      That should give you all you need - get back to us if it doesn't.

      I haven't built SDL ppm packages for later versions of perl outside of that range, and I won't be.
      In fact, that ppm repository should cease to exist in about 10 months time.

      Cheers,
      Rob
        Back it up to SourceForge or strawberry or some such?
Re: Cannot find SDL library with PPM
by Anonymous Monk on Feb 02, 2020 at 11:23 UTC

    When i run 'ppm install SDL' from the Command Prompt it says:

    ppm install failed: Can't find any package that provides SDL

    Can this be helped by adding: 'http://www.sisyphusion.tk/ppm/' to my repolist? If so please tell me where i can find this list.

      ppm install failed: Can't find any package that provides SDL

      If you're running Strawberry Perl, then the sisyphusion repo is already in the search path.
      Therefore that message would indicate that you're running a version of perl that's not in the range 5.10.0 to 5.24.x.
      If you're running Activestate Perl, then that repo won't be included, and you'll need to check the ppm documentation to find out how to add it/

      If so please tell me where i can find this list

      Run ppm set and look through the output.
      On latest Srawberry Perl, I get:
      C:\_32>ppm set Commands will be confirmed. Temporary files will be deleted. Download status will be updated every 16384 bytes. Case-insensitive searches will be performed. Package installations will continue if a dependency cannot be installe +d. Tracing info will not be written. Screens will pause after 24 lines. Query/search results will be verbose. Current PPD repository paths: Sisyphusion: http://www.sisyphusion.tk/ppm Packages will be built under: C:\_64\strawberry-vanilla-5.30.0\data\.p +pm
      From that you can see the sisyphusion repo is already there. If I want to add another repo I can just run:
      C:\_32>ppm set repo somewhereelse http://www.somewhere.else C:\_32>
      And then re-run ppm set to confirm that the somewhereelse repo has been added:
      C:\_32>ppm set Commands will be confirmed. Temporary files will be deleted. Download status will be updated every 16384 bytes. Case-insensitive searches will be performed. Package installations will continue if a dependency cannot be installe +d. Tracing info will not be written. Screens will pause after 24 lines. Query/search results will be verbose. Current PPD repository paths: Sisyphusion: http://www.sisyphusion.tk/ppm somewhereelse: http://www.somewhere.else Packages will be built under: C:\_64\strawberry-vanilla-5.30.0\data\.p +pm C:\_32>
      I don't know if adding repositories on ActivePerl is achievable in the same way.

      It would make the task of providing helpful information a whole lot simpler if you could post the output of perl -V

      Cheers,
      Rob

        sure, here it is:

        Summary of my perl5 (revision 5 version 24 subversion 1) configuration +: Platform: osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread-64in +t uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='C:\Perl\site\bin\gcc.exe', ccflags =' -s -O2 -DWIN32 -DPERL_TE +XTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMP +LICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='C:\Perl\site\bin\g++.exe', ldflags ='-s -static-libgcc -static +-libstdc++ -L"C:\Perl\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' libpth=C:\MinGW\i686-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl524.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -static-libgcc -static-libstdc +++ -L"C:\Perl\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT +_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 2402 [401627] Built under MSWin32 Compiled at Jan 5 2017 01:57:19 @INC: C:/Perl/site/lib C:/Perl/lib . C:\Strawberry\codes>perl -V Summary of my perl5 (revision 5 version 24 subversion 1) configuration +: Platform: osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread-64in +t uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='C:\Perl\site\bin\gcc.exe', ccflags =' -s -O2 -DWIN32 -DPERL_TE +XTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMP +LICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='C:\Perl\site\bin\g++.exe', ldflags ='-s -static-libgcc -static +-libstdc++ -L"C:\Perl\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' libpth=C:\MinGW\i686-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl524.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -static-libgcc -static-libstdc +++ -L"C:\Perl\lib\CORE" -L"C:\MinGW\i686-w64-mingw32\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT +_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 2402 [401627] Built under MSWin32 Compiled at Jan 5 2017 01:57:19 @INC: C:/Perl/site/lib C:/Perl/lib .
Re: Cannot find SDL library with PPM
by Anonymous Monk on Feb 02, 2020 at 09:24 UTC

    Sorry, but i don't know what a repo list is and i don't know how to run 'ppm install SDL' Cpan doesn't recognise this command. I also don't know how to download from SourceForge.

      i don't know how to run 'ppm install SDL'

      Ummm ... ppm is the "Perl Package Manager" alluded to in this thread's original post.
      Are you not the original poster ?

      What happens when you run ppm install SDL ?
      AFAIK, ppm still ships with both Strawberry Perl and Activestate Perl. Are you running a build of perl that is neither ?

      Cheers,
      Rob

      What happens when you run cpan Alien::SDL from the command prompt?

        it says:

        Loading internal null logger. Install Log::Log4perl for logging messa +ges CPAN: Term::ANSIColor loaded ok (v4.06) CPAN: Storable loaded ok (v2.56_01) Reading 'C:\Perl\cpan\Metadata' Database was generated on Sat, 01 Feb 2020 04:17:03 GMT CPAN: Module::CoreList loaded ok (v5.20170114_24) Alien::SDL is up to date (1.446).it says:

Re: Cannot find SDL library with PPM
by Anonymous Monk on Feb 02, 2020 at 16:18 UTC

    My dreams of making a game using perl lie shattered.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11112227]
Approved by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2020-04-05 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (33 votes). Check out past polls.

    Notices?