openssl编译

关于windows下,openssl编译

环境准备
  1. 安装 perl:https://djvniu.jb51.net/200906/tools/ActivePerl5_64.rar

  2. 安装nasm:https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/win64/nasm-2.13.01-installer-x64.exe

  3. 下载opensll源码:https://openssl-library.org/source/old/3.0/index.html

  4. 加入系统PATH变量

  5. 验证

    #验证perl
    perl --version
    #验证nasm
    nasm --version

编译

打开vs 工具=>命令行=>开发者命令提示 (如果配置环境变量之前vs已打开,则关闭vs之后重新打开),不要使用cmd,会提示找不到nmake

cpp 复制代码
#默认Release
#--prefix 需要绝对路径
perl configure VC-WIN64A --prefix=F:\project\openssl-3.0.14\build\vs2019\release\
nmake 
nmake test
nmake install

configuer option:default Release /MD

cpp 复制代码
- `perl Configure VC-WIN32`     if you want 32-bit OpenSSL or
- `perl Configure VC-WIN64A`    if you want 64-bit OpenSSL or
- `perl Configure VC-WIN64-ARM` if you want Windows on Arm (win-arm64)
Debug or Release
cpp 复制代码
#Release
`perl Configure VC-WIN64A`

#debug recommand
`perl Configure VC-WIN64A --debug`
or
`perl Configure debug-VC-WIN64A`
静态库
cpp 复制代码
#如果指定no-shared则默认MT,否则默认MD
#lib & MD
perl Configure VC-WIN32 -static 

#lib & MT
perl Configure VC-WIN32 -static no-shared
/MD /MT
cpp 复制代码
#MT
perl configure VC-WIN64A -static no-shared /MTd --debug
perl configure VC-WIN64A -static no-shared /MT 
#MD
perl configure VC-WIN64A -static /MDd --debug
perl configure VC-WIN64A -static /MD 
demo
cpp 复制代码
    perl configure VC-WIN64A -static no-shared /MTd --prefix=F:\project\openssl-3.0.14\build\vs2019static\debug\ --debug
DOC
cpp 复制代码
查看源文件目录下:NOTES-*.md INSTALL.md
编译 1.x.x版本

整体和上面没有区别,当arch不匹配的时候会报错。

1.编译x86,以管理员身份打开x86 Native Tools Command Prompt for VS 2019

2.编译x64,以管理员身份打开x64 Native Tools Command Prompt for VS 2019

相关推荐
专注VB编程开发20年3 小时前
除了 EasyXLS,加载和显示.xlsx 格式的excel表格,并支持单元格背景色、边框线颜色和粗细等格式化特性
c++·windows·excel·mfc·xlsx
Natsuagin3 小时前
轻松美化双系统启动界面与同步时间设置(Windows + Ubuntu)
linux·windows·ubuntu·grub
xing.yu.CTF5 小时前
Web入侵实战分析-常见web攻击类应急处置实验2
运维·服务器·windows·web安全·apache·php漏洞·phpstudy后门漏洞
ceffans7 小时前
PDF文档中文本解析
c++·windows·pdf
SummerGao.7 小时前
Windows 快速搭建C++开发环境,安装C++、CMake、QT、Visual Studio、Setup Factory
c++·windows·qt·cmake·visual studio·setup factory
Igallta_8136228 小时前
【小游戏】C++控制台版本俄罗斯轮盘赌
c语言·开发语言·c++·windows·游戏·游戏程序
wave_sky10 小时前
Visual Studio中打开多个项目
ide·windows·visual studio
donglxd11 小时前
防御黑客系列-第一集-电脑登录记录提示和登录远程推送
windows·网络安全·电脑·系统安全
iOS技术狂热者12 小时前
如何通过Windows环境远程控制MusicGPT在线生成高质量AI音乐
人工智能·windows
Zucker n15 小时前
deepseek本地调用
java·服务器·windows