如何使用Visual Studio 2017在Windows上构建OpenSSL? [英] How to build OpenSSL on Windows with Visual Studio 2017?

查看:82
本文介绍了如何使用Visual Studio 2017在Windows上构建OpenSSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OpenSSL,但是我坚持进行编译. OpenSSL项目的文档非常不友好(不好).

I am trying to use OpenSSL but I am stuck on the step of compiling. The OpenSSL project has very unfriendly (bad) documentation.

在使用Visual Studio 2017在Windows上构建最新的OpenSSL版本方面是否有任何实际帮助?

Is there any actual help how to build the latest OpenSSL version on Windows with Visual Studio 2017?

我在官方OpenSSL网站上找不到任何有用的信息.是的,Internet上有很多有关OpenSSL编译的文章,但它们都已过时.

I didn't find any helpful information on the official OpenSSL site. Yes, there are a lot of posts on the Internet about OpenSSL compilation, but all of them are obsolete.

推荐答案

我没有使用VS2017,而是以前的版本.我想那是差不多的.简而言之,步骤是:

I've not used VS2017 but previous versions. I imagine it is much the same. In brief the steps are:

  1. 安装Perl(ActiveState或Strawberry)

  1. Install Perl (either ActiveState or Strawberry)

安装NASM

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

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

使用管理特权启动Visual Studio Developer命令提示符(如果要构建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)

如果要使用32位OpenSSL,请从OpenSSL源目录的根目录中输入perl Configure VC-WIN32,如果要使用64位OpenSSL,请输入perl Configure VC-WIN64A

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

如果在任何阶段出现任何问题,请检查安装文件以及 NOTES.WIN 文件.

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

这篇关于如何使用Visual Studio 2017在Windows上构建OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆