openssl在Windows平台编译

环境:
windows10
active perl
vs2017
nasm


(1)设置环境变量:
set VCDIR= D:\VisualStudio\2017\Community\VC\Tools\MSVC\14.15.26726
set WINSDKDIR= D:\Windows Kits\10
set PATH= %PATH%;%VCDIR%\bin\Hostx64\x64;%WINSDKDIR%\bin\10.0.17134.0\x64
set INCLUDE=%VCDIR%\include;%WINSDKDIR%\Include\10.0.17134.0\ucrt;%WINSDKDIR%\Include\10.0.17134.0\um;%WINSDKDIR%\Include\10.0.17134.0\shared
set LIB= %VCDIR%\lib\x64;%WINSDKDIR%\lib\10.0.17134.0\ucrt\x64;%WINSDKDIR%\lib\10.0.17134.0\um\x64
D:\VisualStudio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat x64 10.0.17134.0
(2)产生makefile文件:(D:\openssl-1.1.1-src -> D:\openssl\compile,如果要编译静态库,加 -static 就可以了)
perl Configure VC-WIN64A --prefix=D:\openssl\compile --openssldir=D:\openssl
(3)编译:
nmake

(4)测试:
nmake test
(5)安装:
nmake install

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章