in reply to Tk::Canvas not working

Does "loadable object" refer to anything other than Tk/canvas.pm?

Yes - in this case it's referring to "auto/Tk/Canvas/Canvas.xs.dll" (or perhaps "auto/Tk/Canvas/Canvas.dll") - and that file needs to be in one of the @INC directories.
You'd expect it to be in "C:/Strawberry/perl/site/lib", but it could also be in one of the other @INC directories.

The first thing to do is to try reinstalling the Tk::Canvas module.
If that is done, then things should start working again.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Tk::Canvas not working
by BillKSmith (Monsignor) on Dec 05, 2024 at 14:38 UTC
    I tried to follow your advice by first uninstalling the existing Tk::Canvas with the command cpanm --uninstall Tk::Canvas, and then reinstalling it with the command cpan Tk::Canvas. Uninstall was successful. The installation failed with messages ending as follows.

    In file included from ../pTk/mTk/xlib/X11/Xlib.h:31, from tkWinPort.h:19, from tkPort.h:32, from tk.h:87, from imgBMP.c:11: ../pTk/mTk/xlib/X11/X.h:182:34: error: expected identifier or '(' befo +re numeric constant 182 | #define ControlMask (1<<2) | ^ gmake[1]: *** [makefile:891: imgBMP.o] Error 1 gmake[1]: Leaving directory 'C:/STRAWB~1/cpan/build/Tk-804.036-2/pTk' gmake: *** [makefile:1638: pTk/libpTk.a] Error 2 SREZIC/Tk-804.036.tar.gz C:\STRAWB~1\c\bin\gmake.exe -- NOT OK Stopping: 'install' failed for 'Tk::Canvas'

    This does look familiar. I think that I did have this problem with my original installation of Tk, but do not remember the solution.

    UPDATE: Found my old notes. Refer Tk install fails. I had installed Tk with the command cpanm https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/patched_cpan_modules/Tk-804.036_001.tar.gz. Perhaps I should uninstall all of Tk and repeat that command.

    Bill
      Perhaps I should uninstall all of Tk and repeat that command

      Yes- that's the next thing to try. (Even if the uninstall fails, just forcing a reinstallation of that Tk distro should suffice.)
      It seems odd to me that "cpanm --install Tk::Canvas" tried to install Tk first. It suggests that your existing Tk installation is also unusable.

      Cheers,
      Rob
        When I tried to uninstall Tk, I received a message that TK was not found. It seems like my attempt to uninstall Tk::Canvas had uninstalled all of Tk. When I tried to reinstall Tk, Norton Anti-Virus found viruses in at least two files, including "Win64.Evo.gen[Trj]" in Canvas.xs.dll, which of course caused the install to fail. I now suspect that this whole chain of events was started by Norton downloading a new virus signature which fit this file. It must have removed or quarantined the file without my noticing it. I strongly believe that this is a false positive, but I have not decided how to proceed.
        Bill