1、安装ActivePerl
地址:https://platform.activestate.com/featured-projects
1、注册账号从featured-projects下载完整安装包,非完整版会报错
2、zlib编译
目录:zlib\contrib\vstudio\vc14 编译所需版本
3、OpenSSL:
从 github 上 clone 来的 master 分支, switch 到 1_1_1-stable
使用x86 Native Tools Command Prompt for VS 2017 命令行工具进行编译
编译脚本:
mkdir out
cd out
perl ../Configure VC-WIN32 no-asm --prefix=E:\Document\openssl\out --openssldir=E:\Document\openssl
nmake
nmake test
nmake install
nmake clean
Perl可能会报错:
Can't locate Win32/Console.pm in @INC (you may need to install the Win32::Console module) (@INC contains: C:\Perl64\site\lib C:\Perl64\lib) at C:\Perl64\lib/ActivePerl/Config.pm line 400.
解决办法,修改C:\Perl64\lib\ActivePerl\Config.pm,大约在400行左右:
# Prevent calling Win32::Console::DESTROY on a STDOUT handle
my $console;
sub _warn {
# my($msg) = @_;
# unless (-t STDOUT) {
# print "\n$msg\n";
# return;
# }
# require Win32::Console;
# unless ($console) {
# $console = Win32::Console->new(Win32::Console::STD_OUTPUT_HANDLE());
# }
# my($col,undef) = $console->Size;
# print "\n";
# my $attr = $console->Attr;
# $console->Attr($Win32::Console::FG_RED | $Win32::Console::BG_WHITE);
# for (split(/\n/, "$msg")) {
# $_ .= " " while length() < $col-1;
# print "$_\n";
# }
# $console->Attr($attr);
# print "\n";
}