Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Building GUI EXEs with perl2exe - no window seen

by Pavel (Novice)
on Dec 28, 2001 at 15:18 UTC ( [id://134847]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, everybody.

Following the advice of one experienced Monk, I tried to use perl2exe (trial version so far) to build EXEs from scripts that use Tk. The EXE building runs fine. When I start the EXE I see a message window that reads that this file was build with an evaluation copy of perl2exe and so on. The problem is, that after clicking "OK" in this window I do not see my program window, and the application seems to terminate after showing the info screen.

I will appreciate any good advice (and advice from Jouke especially).

Happy New Year!

  • Comment on Building GUI EXEs with perl2exe - no window seen

Replies are listed 'Best First'.
Re: Building GUI EXEs with perl2exe - no window seen
by Dr. Mu (Hermit) on Dec 28, 2001 at 23:49 UTC
    First off, unless things have changed since I got perl2exe, you can't use the -gui flag with the trial version. Second, you should start your program from a DOS window, so any error messages will persist long enough to read them. More than likely, if you are just doing a "use Tk;", you will also have to add uses for the individual widgets, e.g. "use Tk::Canvas;", etc. The documentation file that comes with perl2exe explains all this.
Re: Building GUI EXEs with perl2exe - no window seen
by sifukurt (Hermit) on Dec 28, 2001 at 20:17 UTC
    What is the information you're passing to perl2exe? I've built many Tk EXEs and haven't run into the problem you're describing. Are you building with the -gui flag? If so, build it again without that flag, that way you can see error messages that would otherwise be completely lost. If it runs correctly as a perl script but doesn't run correctly as an exe, I'd wager that the problem is that there are at least a few modules that aren't being included in the exe file. In your script, you have to expressly use every module that the modules you're already using depend upon. Let me give you a quick example. I was building an EXE with perl2exe that used Math::BigInt. It ran correctly as a regular ol' perl script, but didn't run as an exe file. The problem was that Math::BigInt was using Math::BigInt::Calc, and that's where the exe file was choking. Once I expressly included use Math::BigInt::Calc in my script and rebuilt the exe file, it worked fine. If that doesn't work for you, post exactly what you're passing to perl2exe and I'll try to replicate the problem on my end.
    ___________________
    Kurt

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2024-04-25 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found