Is it possible to build a single executable Perl program that will run on a variety of platforms?
I have a Perl script that I've written and can compile it using pp (PAR). I'm curious if it's possible to make a single executable that is completely portable (run on linux & w开发者_Python百科indows) or do I have to create 2 executables (one for linux and one for windows). I'm not interested in options using perlapp or perl2exe, I'm strictly looking for a PAR/pp option here. Also I'm not looking for PAR's capability to create a .par file and have a stub Perl environment pre-deployed for the OS varieties.
EDIT:
When running the file command against a binary built on my linux system it shows the binary is of the following type:
% file my_app
my_app: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped.
This would seem to indicate that it will only run on a linux system.
It's impossible to build a single executable that will run on a variety of platforms as they use different formats for their binaries.
精彩评论