I have a perl script on a linux system that I would like to compile to generate an executable that runs natively on Windows. I would like to do this with free software, preferably Perl PAR / pp. Is this possible?
-
Have you even tried with PAR?xmc– xmc2012-01-09 04:01:50 +00:00Commented Jan 9, 2012 at 4:01
-
Hi Xavier. I tried PAR (pp), but the executable only works on Linux.user001– user0012012-01-09 04:18:54 +00:00Commented Jan 9, 2012 at 4:18
Add a comment
|
1 Answer
You need to run pp on a windows machine to make a windows binary. I know it works, I've done it. Any Linux specific code will need to be made at least platform-independent or windows specific, but Perl is a generally platform independent language. Using File::Spec will help.
8 Comments
user001
Thanks @JoelBerger. I downloaded ActiveState perl on windows and downloaded the PAR module, but don't have the pp utility.
Joel Berger
Try installing
PAR::Packer too. Personally I would try the Strawberry Perl distribution rather than AS. AS uses PPM which is less like Linux-based module installation. Strawberry Perl uses a system which contains a Unix-like build system, therefore much closer to a Linux-esque system.Joel Berger
Also you might cheat and install PAR with PPM, but use
cpan PAR::Packer at the command prompt to install pp. I believe that it is pure Perl so that should work. IIRC this is what I did to make it workikegami
@Joel Berger, AS provides the same build env as Strawberry in addition to
ppm. AS released it's 5.14 build mere days after 5.14 came out (if not the day of), and Strawberry still doesn't have a 5.14 build after 7 months (although it appears they have a beta build of it finally).ikegami
@Joel Berger, I try not to use distro perl. (perlbrew ftw) If I use the distro perl, I use the distro installer.
|