Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Creating Standalone Win32 Executable

by bihuboliya (Acolyte)
on Jul 20, 2012 at 08:14 UTC ( [id://982760]=perlquestion: print w/replies, xml ) Need Help??

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

Hi Monks,

I am trying to make an windows executable from a script. I installed PAR-Packer-1.013 module and used the command "pp -o executable.exe myScript.pl". The executable is created, however, when I try to run it on a machine where Perl is not installed, I get the error message "The program cannot start because Perl514.dll is missing". Please let me know how to create the executable along with the required dll files.

Thanks in advance

Replies are listed 'Best First'.
Re: Creating Standalone Win32 Executable
by Anonymous Monk on Jul 20, 2012 at 08:20 UTC

    That sounds suspicious, what did you install exactly?

    After you build an exe with pp -x ... try it out locally by first using set path= then  myexe.exe

      Thanks for the reply. I actually did not use the -x option. I did 'pp -o a.exe b.perl'. I installed the module 'PAR-Packer-1.013'

        Just checking: Did you follow the link Anonymonk gave you to see why the -o option is not appropriate?

        I installed the module 'PAR-Packer-1.013'

        You said that in your original post, you should be more specific

Re: Creating Standalone Win32 Executable
by marto (Cardinal) on Jul 20, 2012 at 09:15 UTC

    I received your /msg asking for help with this. I had read the post, and the replies, I'm not sure what I can add to the existing answers, but here we go.

    Consider running with the -x option:

    pp -x myscript.pl

    Then test the executable created. Please read and understand the pp documentation and http://par.perl.org. If you have further problems please provide more details.

      Hi... I got it running in the client machine after copying the per514.dll file from my machine to the current folder of the client machine where there is no Perl installation :) However, please let me know if somehow I could make the dll file included in the exe itself. By the way, it seems pp does check for all the dependencies and included them while making the exe.

        Well something is going wrong. Perhaps you're not following the pp -x .... advice you've been given several times now, or there could be something else going on. You haven't provided any other information so there's little I can do to help which wouldn't simply be research you could do yourself.

        please let me know if somehow I could make the dll file included in the exe itself.

        Have you even read the docs?

        -l, --link=FILE|LIBRARY Add the given shared library (a.k.a. shared object or DLL) into th +e packed file. Also accepts names under library paths; i.e. -l ncurse +s means the same thing as -l libncurses.so or -l /usr/local/lib/libnc +urses.so in most Unixes. May be specified multiple times.

        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku ................... flash japh
Re: Creating Standalone Win32 Executable
by Anonymous Monk on Jul 21, 2012 at 06:52 UTC

    You're not using the -d option by any chance?

    Don't do that

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-24 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found