How to Build OpenSSL on Windows with Visual Studio, Visual C++, ActiveState PERL

preview_player
Показать описание
How to build #OpenSSL on Windows Using Visual Studio

Download Precompiled Binary:

OpenSSL 1.1.1 for Visual Studio 2015 (dll, static, x82, x64):

OpenSSL 1.1.1 for Visual Studio 2017 (dll, static, x82, x64):

OpenSSL 1.1.1 Source fixed for Visual Studio:

0. Prerequisites:

Visual Studio 2017 (Visual C++ compiler)
on Windows 7, 8, 8.1, 10

1. Command Prompt - with Administrator Privilege

1. Download OpenSSL master package

2. Either Visual Studio 2015 or 2017 should be installed on your machine.

3. Install PERL


cpan -i Text::Template
cpan -i Test::More

4. Download nasm

5. Configuration

VC-WIN64A for Visual C++ for AMD64 or x86-x64 (or Intel - x64 - Desktop CPU)

VC-WIN64I for Visual C++ for Intel - x64 - Intel Itanium Architecture CPU

// installation folder
--prefix=C:\DevSoft\OpenSSL\DLL\x64\Release

// key store folder
--openssldir=C:\DevSoft\OpenSSL\SSL

// release build
--release

// debug build
--debug

// static library
no-shared

// default is shared library or DLL on Windows
Configuration for Visual C++, x64-bit, x86-64, AMD64
shared library (or DLL), release

perl Configure
VC-WIN64A
--release
--prefix=C:\DevSoft\OpenSSL\DLL\x64\Release
--openssldir=C:\DevSoft\OpenSSL\SSL

Configuration for Visual C++, x64-bit, x86-64, AMD64
shared library (or DLL), debug

perl Configure
VC-WIN64A
--debug
--prefix=C:\DevSoft\OpenSSL\DLL\x64\Debug
--openssldir=C:\DevSoft\OpenSSL\SSL

Configuration for Visual C++, x64-bit, x86-64, AMD64
static library, release

perl Configure VC-WIN64A
--prefix=C:\DevSoft\OpenSSL\Lib\x64\Release
--openssldir=C:\DevSoft\OpenSSL\SSL
no-shared

Configuration for Visual C++, x64-bit, x86-64, AMD64
static library, debug

perl Configure VC-WIN64A
--debug
--prefix=C:\DevSoft\OpenSSL\Lib\x64\Debug
--openssldir=C:\DevSoft\OpenSSL\SSL
no-shared

To build
nmake

To test build
nmake test

To install all component including documentation
nmake install

To install software component only
nmake install_sw

To clean up
nmake clean

Further References:

Рекомендации по теме
Комментарии
Автор

One of the best video tutorials I've ever used. Thank you. I used it to help me find my way to build openSSL 1.0.2 and even though there were differences, I got there. Thank you so much!

mjrichmond
Автор

Thank you, Kim! I am building a node application on windows and need to incorporate SSL soon and this is just what I was looking for :)

Systemglitch
Автор

안녕하세요. 덕분에 빌드성공했습니다. 대단히 감사드립니다.
질문이 하나 있어서요.
OpenSSL이 기본적으로 UNICODE로 빌드되는것 같은데요, MBCS로 빌드할려면 어떻게 해야 할까요?
시간되실때 답변부탁드립니다. 감사합니다.

한가주-yx
Автор

I get this error from cpan -i Text::Template, how do I fix it?

>(error): Could not expand [Text::Template]. Check the module name.

whateveryh
Автор

For cpan files, I get dmake is not recognized as an internal or external command, operable program or batch file.

Dmake -- NOT OK

BusyAngel
Автор

Please guide to build 1.1.1e on Visual Studio 2013 and link it to Apache 2.4.41. I want to compile it!

tumatanquang
Автор

Please provide link to precompile 1.1.1a 32-bit static lib

pawarlg
Автор

i got : 'nasm' is not recognized as an internal or external command,
operable program or batch file. after you got this... in x64 VS 2017

pozso
Автор

I am getting LWP failed error 500, an existing connection was forcibly closed by remote host

karnalkarhimanshu
Автор

I have an issue when I try and build for 64Bit windows DLL. I get the following error "Can't locate Win32/Console in @INC ..."

DO you have idea what is causing this. Thanks in advance

ZosoOfZep
Автор

I got the error ‘crumb ‘ is not recognized as an internal or external command... in VS 2017

sibahlenhleko
Автор

I did follow everything but "perl not recognized" damn ! same for nasm

lifeforce
Автор

This is great but outdated! Please update it so that it can be compiled with VS 2019! Thanks!

jdpho
Автор

will this work for c as well?
i need help pls! program due soon

herbievance
Автор

Upon execution "perl configure VC-WIN64A --release --openssldir=C:\openssl\ssl" in VS 2019 Command Tool get below error

Error Information: -
Configuring OpenSSL version 1.1.1d (0x1010104fL) for VC-WIN64A
Using os-specific seed configuration
Compilation failed in require at line 9.
BEGIN failed--compilation aborted at line 9.
Compilation failed in require at C:/Perl64/site/lib/IPC/Cmd.pm line 235.

Software Installed: -
1) ActiveState Perl v5.28.1 x64 built for MSWin32-x64-multi-thread
2) NASM 2.14.02 (x64)

OS : Windows 10 x64

ankitpeshwaria
join shbcf.ru