Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Perl2exe Problem

by blackadder (Hermit)
on Aug 22, 2002 at 17:00 UTC ( #192088=perlquestion: print w/ replies, xml ) Need Help??
blackadder has asked for the wisdom of the Perl Monks concerning the following question:

Hi Brotheren

I have a script that I want to compile to an exe form. I never had any problems with converting to exe before. However, when I do try to convert it, I get the following error massage.

PLEASE SEE THE PERL2EXE USER MANUAL UNDER "Can't locate somemodule.pm +in @INC" FOR AN EXPLANATION OF THE FOLLOWING MESSAGE: Can't locate Tk/Photo.pm in @INC (@INC contains: PERL2EXE_STORAGE C:\T +EMP C:\Perl .) at PERL2EX E_STORAGE/Tk/Widget.pm line 259. This exe file was created with the evaluation version of Perl2Exe. For more information visit http://www.indigostar.com (The full version does not display this message with a 2 second delay. +) ...
I am not sure why is this happening. In my script I have 2 gif type icons which I use in the script to represent user account, I have ensured that those 2 icons are in in the perl/bin directory, I went even further and dropped it into the perl2exe directory. Still I get this massage.

Any Perls of wisdom please will be enormously appreciated.

Blackadder

Comment on Perl2exe Problem
Download Code
Re: Perl2exe Problem
by the_slycer (Chaplain) on Aug 22, 2002 at 17:26 UTC
    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.
      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.
Re: Perl2exe Problem
by Anonymous Monk on Aug 23, 2002 at 08:15 UTC
    Hi,
    just include

    #perl2exe_include Tk/Photo

    in your code. It may ask for more of those type of includes. I mostly make an extra file with all includes for perl2exe in case of a large script.

      Many Thanks to all, your advices have worked.

      I really think that I should also say this,
      I believe that the services we all get from PM, are really exceptional and very valuable, therefore we should all dig in deep into our pockets every now and then and donate. I can't recall one IT product that I worked on and got as much support as I do/did/done with Perl here in PM.

      Thanks again, and lets all keep up the good work here in our monastery.
      …Cheers

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://192088]
Front-paged by erikharrison
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-07-11 08:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (222 votes), past polls