在 Linux 上从 Perl 源编译本机 Windows 可执行文件
我在 Linux 系统上有一个 perl 脚本,我想对其进行编译以生成在 Windows 上本机运行的可执行文件。我想使用免费软件来完成此操作,最好是 Perl PAR / pp
。这可能吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在 Windows 计算机上运行 pp 来生成 Windows 二进制文件。我知道它有效,我已经做到了。任何特定于 Linux 的代码至少需要独立于平台或特定于 Windows,但 Perl 通常是一种独立于平台的语言。使用
File::Spec
会有所帮助。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. UsingFile::Spec
will help.