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

Hi Monks,

When I run the exe file the following error shows:

"Program Error" kanish.exe has generated errors and will be closed by Windows. You wil +l need to restart the program. An error log is being created.

But, when I run the .pl file, its working well. Please guide me why it not running exe.

I am using "perlapp" to convert .pl to .exe

Thank You,

Kanishk

2005-12-13 jdporter: retitled from simply "Program Error"

Replies are listed 'Best First'.
Re: "Program Error" when running .exe created by perlapp
by spiritway (Vicar) on Dec 13, 2005 at 05:57 UTC

    You might want to take a look at the dialog boxes that open for perlapp, to see what the various options were (if you didn't select them yourself). You may find that the defaults don't work for you.

    You may also want to try adding some debugging code in the program, and also selecting an option to generate a debugging-friendly exe file. Your own code could be simple "warn" statements (don't use "print" - use "warn", because that prints immediately, and can give you an idea of where you are). You should have a debugger that came with the perlapp program, right? If you do, then use it.

    Finally, see if you can cut out parts of your script, and still get the error message. That is, try to isolate the place where the error happens. You might then see the error right away. Or, if it's a small enough script, you might be able to post it and give us an idea of what you're up against. Without the code, there's not a whole lot anyone could do to help, I think...

Re: "Program Error" when running .exe created by perlapp
by PodMaster (Abbot) on Dec 13, 2005 at 06:23 UTC
    An error log is being created.
    What does the error log says?

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: "Program Error" when running .exe created by perlapp
by sanPerl (Friar) on Dec 13, 2005 at 07:08 UTC
    If there is Nothing secret about the script, then can we see the script?
    Or else try creating executables of the script in phases (i.e. by running first 20 LOC, then 40 LOC etc). Check, ,till which it point is running okay. Once you get error, check why you get error at that point only
Re: "Program Error" when running .exe created by perlapp
by Fletch (Bishop) on Dec 13, 2005 at 13:31 UTC

    Considering PerlApp is a commercial product have you considered asking the people you paid for it for support?