使用MSVC编译器编译OpenSSL的注意事项

========================================================编译前的准备===========================================================
1.安装Perl
2.确保有Visual Studio
===============================================================================================================================

===============================================================编译静态库===============================================================
1.编译32位的Debug静态库
1.1 打开"x86 Native Tools Command Prompt for VS 2022"命令行工具
1.2 进入到openssl的源代码路径中
1.3 输入[Perl Configure debug-VC-WIN32 no-shared no-asm --prefix="C:/msvc32_static_debug_build"]
1.4 输入"nmake"进行编译
1.5 编译完成后,输入"nmake install"进行安装即可

2.编译32位的Release静态库
2.1 打开"x86 Native Tools Command Prompt for VS 2022"命令行工具
2.2 进入到openssl的源代码路径中
2.3 输入[Perl Configure VC-WIN32 no-shared no-asm --prefix="C:/msvc32_static_release_build"]
2.4 输入"nmake"进行编译
2.5 编译完成后,输入"nmake install"进行安装即可

3.编译64位的Debug静态库
3.1 打开"x64 Native Tools Command Prompt for VS 2022"命令行工具
3.2 进入到openssl的源代码路径中
3.3 输入[Perl Configure debug-VC-WIN64A no-shared no-asm --prefix="C:/msvc64_static_debug_build"]
3.4 输入"nmake"进行编译
3.5 编译完成后,输入"nmake install"进行安装即可

4.编译64位的Release静态库
4.1 打开"x64 Native Tools Command Prompt for VS 2022"命令行工具
4.2 进入到openssl的源代码路径中
4.3 输入[Perl Configure VC-WIN64A no-shared no-asm --prefix="C:/msvc64_static_release_build"]
4.4 输入"nmake"进行编译
4.5 编译完成后,输入"nmake install"进行安装即可
========================================================================================================================================

===============================================================编译动态库===============================================================
1.编译32位的Debug动态库
1.1 打开"x86 Native Tools Command Prompt for VS 2022"命令行工具
1.2 进入到openssl的源代码路径中
1.3 输入[Perl Configure debug-VC-WIN32 shared no-asm --prefix="C:/msvc32_shared_debug_build"]
1.4 输入"nmake"进行编译
1.5 编译完成后,输入"nmake install"进行安装即可

2.编译32位的Release动态库
2.1 打开"x86 Native Tools Command Prompt for VS 2022"命令行工具
2.2 进入到openssl的源代码路径中
2.3 输入[Perl Configure VC-WIN32 shared no-asm --prefix="C:/msvc32_shared_release_build"]
2.4 输入"nmake"进行编译
2.5 编译完成后,输入"nmake install"进行安装即可

3.编译64位的Debug动态库
3.1 打开"x64 Native Tools Command Prompt for VS 2022"命令行工具
3.2 进入到openssl的源代码路径中
3.3 输入[Perl Configure debug-VC-WIN64A shared no-asm --prefix="C:/msvc64_shared_debug_build"]
3.4 输入"nmake"进行编译
3.5 编译完成后,输入"nmake install"进行安装即可

4.编译64位的Release动态库
4.1 打开"x64 Native Tools Command Prompt for VS 2022"命令行工具
4.2 进入到openssl的源代码路径中
4.3 输入[Perl Configure VC-WIN64A shared no-asm --prefix="C:/msvc64_shared_release_build"]
4.4 输入"nmake"进行编译
4.5 编译完成后,输入"nmake install"进行安装即可
========================================================================================================================================

posted @ 2025-11-21 09:50  蜡笔小新Pointer  阅读(11)  评论(0)    收藏  举报