[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

App::Packer / PAR question - Creating Perl Executables on Win32 Machines

Posted on 2004-10-06
8
Medium Priority
?
1,049 Views
Last Modified: 2007-12-19
Hi everyone,

I've been using Perl for some time now, but only recently learned about the ability to 'compile' perl into exe's using utilities like perl2exe. I also recently discovered the App::Packer / PAR modules, which are free, and being the cheapskate that I am, I'd like to use them rather than shelling out $400 for a full version of perl2exe.

I recently downloaded and installed App::Packer, and got it to work with a 'hello world' script (i.e. it successfully compiled a Win32 exe). However, when I try to compile scripts with modules, I get errors similar to this one:

   Error while creating Module::Info object for 'Time::Zone' at F:/Perl/site/lib/App/Packer/Frontend/ModuleInfo.pm line 123.

I have a feeling I need a modified version of Module::Info, but I'm not sure which one or where to get it. The other problem with App::Packer seems to be that you have to search through your perl directory and copy all the DLLs that the compiled exe needs.

Ideally, I would like to be able to do the following things using PAR:
1) Compile any given perl script into an exe, preferably with any library code (dlls) needed bundled into the exe itself
2) Be able to do #1, but without a terminal popping up. I'd like this so I can make GUIs with Perl/Tk, or call the exe's from other languages

Is this possible? If so, can someone walk me through the following:
1) which modules do I need? Where can I get them, is there anything more to installing them than the usual "ppm install mod-name.ppd"
2) can you give me a script that uses the modules to compile EXEs from other scripts (perferably with an option to compile with and without a terminal popping up on execution), and show me how to use it.

Bigtime thanks in advance to anyone who can help me out!


0
Comment
Question by:nicholassolutions
  • 3
  • 3
7 Comments
 
LVL 15

Author Comment

by:nicholassolutions
ID: 12235257
PS: I don't have much of a feeling for how much work this will be...I am fairly experienced with perl, so I shouldn't be too hard to help out, but if it is a lot of work, I would not mind splitting this question into parts.
Cheers,
Matt
0
 
LVL 85

Expert Comment

by:ozo
ID: 12235621
perl -MO=C foo.perl
0
 
LVL 85

Expert Comment

by:ozo
ID: 12235728
perldoc perlcc
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 85

Expert Comment

by:ozo
ID: 12235755
0
 
LVL 15

Author Comment

by:nicholassolutions
ID: 12241539
thanks ozo

Unfortunately, I can't get your first two solutions to work...I get errors such as when doing perlcc test.pl

Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for wsock32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
'cl' is not recognized as an internal or external command,
operable program or batch file.
'link' is not recognized as an internal or external command,
operable program or batch file.

This happens even when trying to compile a simple hello world type of script. I also tried having it output C code and compiling that myself, but without successs. I have read in a few places that perlcc is not very reliable, and that most people use PAR instead.

Can someone walk me through using PAR to compile perl scripts into executables?

0
 
LVL 15

Author Comment

by:nicholassolutions
ID: 12243615
I've figured out using PAR on Windows for myself...I'll be posting a page for anyone interested at the following address soon:

http://www.nicholassolutions.com/tutorials/perl-PAR.htm

Cheers,
Matt
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12278420
Question answered by asker or dialog valuable.
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question