且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 Visual Studio 2017 在 Windows 上构建 OpenSSL?

更新时间:2023-02-27 13:12:10

我没用过 VS2017,但以前的版本.我想它是一样的.请注意,以下说明适用于 OpenSSL 1.1.0 或更高版本.它们不适用于 OpenSSL 1.0.2.简要的步骤是:

I've not used VS2017 but previous versions. I imagine it is much the same. Note the instructions below are for OpenSSL 1.1.0 or above. They do not work for OpenSSL 1.0.2. In brief the steps are:

  1. 安装 Perl(ActiveState 或 Strawberry)

  1. 安装 NASM

  1. Install NASM

确保 Perl 和 NASM 都在您的 %PATH%

Make sure both Perl and NASM are on your %PATH%

使用管理权限启动 Visual Studio 开发人员命令提示符(如果您正在构建 32 位 OpenSSL,请确保使用 32 位,如果您正在构建 64 位 OpenSSL,请确保使用 64 位))

Fire up a Visual Studio Developer Command Prompt with administrative privileges (make sure you use the 32-bit one if you are building 32-bit OpenSSL, or the 64-bit one if you are building 64-bit OpenSSL)

从 OpenSSL 源目录的根目录输入 perl Configure VC-WIN32,如果你想要 32 位 OpenSSL 或 perl Configure VC-WIN64A 如果你想要 64 位 OpenSSL

From the root of the OpenSSL source directory enter perl Configure VC-WIN32, if you want 32-bit OpenSSL or perl Configure VC-WIN64A if you want 64-bit OpenSSL

输入nmake

进入nmake test

输入nmake install

如果任何阶段出现问题,请检查INSTALL文件和 NOTES.WIN 文件.

If anything goes wrong at any stage, check the INSTALL file and the NOTES.WIN file.