windows openssl-1.1.1 编译静态库和动态库

时间:2023-03-08 16:36:13

一下为windows上安装过程

1、下载 openssl-1.1.0.tar.gz

2、安装 ActivePerl, 可以到http://www.activestate.com/activeperl/downloads下载最新版本, 需要用到 perl 解释器。

注:Perl 最低版本要求5.10以上,Windows XP用户最后支持版本ActivePerl 5.20.2.2002 版本

3、使用 VS2010 下的 Visual Studio 2010 Command Prompt 进入控制台模式 (这个模式会自动设置各种环境变量,根据编译32位、64位、Itanium自己选择)。

4、安装dmake,ppm install dmake

5、解压缩 openssl 源代码包,进入 openssl 的根目录, 如 E:\openssl-1.1.0。

6、动态库:perl configure VC-WIN32 --prefix="e:\mylib"

静态库:perl configure  no-shared VC-WIN32 --prefix="e:\mylib"

必须在 c:\openssl-1.1.0 目录下执行该命令, 否则找不到 Configure 文件, 这时就必须指定完整的 Configure 文件路径。

64编译的话 Win64/x64 执行 perl Configure VC-WIN64A;Win64/IA64 执行 perl Configure VC-WIN64I。

注意:VC-WIN32必须大写,编译选项有大小写区分,--prefix设置编译成功后lib的存放目录

7、正式编译

8、编译, nmake

9、编译, nmake test

10、编译, nmake install