windows 編譯openssl
版本openssl1.1.0g
1 準備工作
1.1 下載openssl1.1.0g
地址: https://github.com/openssl/openssl/tree/OpenSSL_1_1_0g
1.2 安裝perl
我使用的strawberry 版本號v5.28.2
地址:http://strawberryperl.com/
安裝好後perl -v可以查看版本號
安裝完strawberry後打開的cmd才能使用perl命令(新增加的環境變量對已經打開的cmd不生效)
2 編譯
2.1 配置
打開 適用於VS2017的x64本機工具命令提示
cd到openssl目錄cd g:\openssl-1.1.0g
執行perl Configure VC-WIN64A no-asm --prefix=g:\build\openssl\win64a
VC-WIN64A
表示生成x64的庫。
no-asm
不使用匯編加速編譯
g:\build\openssl\win64a
輸出路徑
(需要32位的使用工具 x86 Native Tools Command Prompt for VS 2017
編譯 使用命令perl Configure VC-WIN32 -prefix=g:\build\openssl\win32
配置)
2.2 編譯
執行nmake
執行nmake test
執行nmake install
同一個目錄下編譯不同版本(win32|64|release|debug)時需要先nmake clean