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

i have been using win32::multimedia:: joystick for many years on a variety of computers. i can not get it to work on my new win 10 computer no matter what i do. i get a compilation failed in require error message. the requires are dynaloader, exporter and autoloader. i have tied replacing these with versions form machines on which they work and have tried everything else i can without success. win32::multimedia::joystick was installed using PPM or Cpanamis as i have done in the past. there must be some version conflict but i do not see any specific version specified in the joystick PM code. i have checked path and env variables and added everything i can and again it will not work. many other PMs i have installed work fine but i have not done a lot of testing on this new machine. there is another joystick PM that works fine but it only works with three axis and very few of the buttons so my preferred one should work if i can get beyond the include issue. anything to check that i might have missed? any win 10 incantations necessary?

Replies are listed 'Best First'.
Re: win32 joystick
by davido (Cardinal) on Sep 06, 2016 at 19:17 UTC

    If you have replaced DynaLoader, Exporter, and AutoLoader with versions from some other installation of Perl, since these modules ship with Perl, you may have inadvertently broken your Win10 install of Perl. I'd get that back to a clean state first, and then pull in Win32::Multimedia::Joystick and build it the old fashioned way (make, make test, make install). Watch the test failures, and report back exactly which tests failed.

    By the way, are you able to post a link to where this module lives? I couldn't find it searching CPAN under that name.


    Dave

Re: win32 joystick
by stevieb (Canon) on Sep 06, 2016 at 19:39 UTC

    I created a VM with a Win10 install quickly, and performed the following tasks to get Win32::MultiMedia::Joystick to seemingly work (well, it doesn't complain about missing modules or brokenness). I use berrybrew here, as it allows you to keep separate your system Perl, and allows you to remove an installation if it breaks, and re-install at will.

    • download/extract berrybrew.zip somewhere (not c:\berrybrew)
    • open a cmd window
    • cd berrybrew
    • bin\berrybrew.exe config (type 'y' when asked)
    • close the current cmd window and open a new one
    • berrybrew install 5.24.0_64
    • berrybrew switch 5.24.0_64
    • close cmd window, open a new one
    • cpanm Win32::MultiMedia::Joystick

    Then, on the command line:

    perl -MWin32::MultiMedia::Joystick -e ''

    You shouldn't get any errors. Attempt running your script on the command line at this point and see what happens.

    To go back to using your (possibly broken) system Perl, just do berrybrew off.

Re: win32 joystick
by stevieb (Canon) on Sep 06, 2016 at 15:55 UTC

    Please post the output that includes the failure message(s). Either the build log from cpanm, or the output from cpan.

      i am using Komodo IDE. the line "use Win32::Multimedia::Joystick;" puts up the following message "compilation failed in require BEGIN failed compilation aborted" so Komodo is having a problem with one or more of the included modules which are if i try to "run" the Joystick PM in Komodo (i know this is not something to run but it checks the includes etc and gives the following message. the files it is complaining about not finding are just where it is looking for them. Can't load 'C:/Perl/site/lib/auto/Win32/MultiMedia/Joystick/Joystick.dll' for module Win32::MultiMedia::Joystick: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 226. at C:/Perl/lib/DynaLoader.pm line 129 DynaLoader::croak('Can\'t load \'C:/Perl/site/lib/auto/Win32/MultiMedia/Joystick...') called at C:/Perl/lib/DynaLoader.pm line 226 DynaLoader::bootstrap('Win32::MultiMedia::Joystick', 0.01) called at C:\Perl\site\lib\Win32\MultiMedia\Joystick.pm line 46