Solved

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

Posted on 2004-10-06
8
984 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
8 Comments
 
LVL 15

Author Comment

by:nicholassolutions
Comment Utility
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 84

Expert Comment

by:ozo
Comment Utility
perl -MO=C foo.perl
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
perldoc perlcc
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 84

Expert Comment

by:ozo
Comment Utility
0
 
LVL 15

Author Comment

by:nicholassolutions
Comment Utility
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
Comment Utility
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
Comment Utility
Question answered by asker or dialog valuable.
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now