windows下编译openssl

       开源的坑一堆堆

       编译环境:windows10 + Visual Studio 2015 + strawberry perl 5.32.1.1-64bit + openssl-1.1.1k,其中最重要的就是strawberry perl。openssl推荐的windows下的perl是ActivePerl,网上一搜也都是千篇一律的使用ActivePerl,结果忙活了半天,各种查各种试,全都是这种错误:

Configuring OpenSSL version 1.1.1k (0x101010bfL) for VC-WIN32
Using os-specific seed configuration
Can't locate Win32/Console.pm in @INC (you may need to install the Win32::Console module) (@INC contains: C:/openssl-1.1.1k/util/perl D:/application/perl64/site/lib D:/application/perl64/lib) at D:/application/perl64/site/lib/ActivePerl/Config.pm line 400.
Compilation failed in require at D:/youyb/application/perl64/site/lib/ExtUtils/MakeMaker.pm line 10.
BEGIN failed--compilation aborted at D:/youyb/application/perl64/site/lib/ExtUtils/MakeMaker.pm line 10.
Compilation failed in require at D:/youyb/application/perl64/site/lib/IPC/Cmd.pm line 235.

       最后在stackoverflow上找了一个帖子,帖子里说有人用strawberry perl成功了,自己一试果然如此。至于strawberry perl和ActivePerl啥区别网上说的挺细,这里就不说了。

       编译步骤:

       1,下载strawberry perl   https://strawberryperl.com/releases.html,可以选择ZIP edition解压即可用,免安装。

       2,添加path环境变量,如:c:\strawberry-perl-5.32.1.1-64bit\perl\bin,命令行perl -v看版本

       3,下载openssl  https://www.openssl.org/source/,解压,如:c:\openssl-1.1.1k

       4,打开Developer Command Prompt for VS2015命令行工具,cd进入c:\openssl-1.1.1k

       5,perl Configure VC-WIN32 no-asm --prefix=d:\openssl           (可选项:VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE,--prefix是最终拷贝的目录;添加no-shared参数可生成静态库)

       6,nmake

       7,nmake test

       8,nmake install

       最后生成的目录下文件如下:

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值