http://www.perlmonks.org?node_id=192094


in reply to Perl2exe Problem

It's been a while since I've p2exe'd, but from what I recall, when using Tk, you must explicitly declare in the use statements the submodules that you need to use.

So try "use Tk::Photo;" at the top of your script.

Replies are listed 'Best First'.
Re: Re: Perl2exe Problem
by Popcorn Dave (Abbot) on Aug 22, 2002 at 21:42 UTC
    You most certainly do. I jut found that out when I had to declare use Tk::CheckButton before it would work for me.

    One question though... I tried it with a Tk app I wrote, but it keeps bringing up a DOS window when I run it. Of course the DOS window doesn't stay on as long as running a Tk app straight from windows, but I'm curious what the advantage is -- if any -- for converting Tk apps with this program?

    Some people fall from grace. I prefer a running start...

      Perl2exe takes a -gui parameter (perl2exe.exe -gui script.pl) which prevents the display of the DOS window you describe. Just ran into this myself lately, when I first had cause to build something both GUI and standalone.
      I just posted the code that I use to avoid the dos window in the CUFP section here. I start all my perl daemons on my win2000 machine with this on startup.

      HTH.