我在编译我的 perl 脚本时遇到了很多麻烦。
我在脚本中使用了各种模块:
use fetchinfo; #which I wrote so it's in the same directory as my script
use threads;
use threads::shared;
use Tk;
use Fcntl ':flock';
use WWW::Mechanize;
use URI::Escape;
use Date::Calc qw(Delta_Days);
use LWP::Simple;
use HTML::Parser;
最佳答案
你知道所有perl2exe
是创建一个包含所有源文件的 perl 解释器可执行文件的副本(可能处于编译状态,我不确定)?
我建议您使用 PAR package
相反,它将构建一个包含所有可以从 perl
运行的必要源的单个存档文件。命令行。
如果您绝对必须有一个可执行镜像,请查看 PAR::Packer
反而。
更新
I actually want this program to run on computers without perl installed on them. I understood I have to compile my code for this to work. PAR package doesn't do that, right?
ByteLoader
而增加。解释生成的解析树所必需的模块。I actually need help installing and using PAR::Packer since I couldn't install it on ActivePerl on windows and the executable it made for me on linux didn't work on windows 64-bit. So I'm doing something wrong
Par::Packer
在 Strawberry Perl 5 16.2 版上安装良好并通过所有测试。请理解,您无法在一个系统上构建将在不同平台上运行的可执行文件。这适用于每种语言,而不仅仅是 Perl。您需要在与您的目标兼容的系统上使用 Perl 的工作版本,以便能够构建可以在其他地方工作的可执行文件。
https://stackoverflow.com/questions/15586781/
相关文章:
python - python err : Local variable referenced be
xcode - Intel C++编译器,无法在OS X上打开stdarg.h
perl - "error: variable length array of non-POD el
compiler-construction - 未定义对ruserok错误的引用
android - 如何解决java.lang.NoClassDefFoundError
android - Android Studio 0.2.1错误
visual-c++ - 如何针对VES2008编译Greta?