-
Notifications
You must be signed in to change notification settings - Fork 2.2k
How to Build OpenSSL 1.0 on Windows
In order to build OpenSSL on Windows for use with POCO using Visual Studio 2015, follow these steps:
Note: this covers OpenSSL 1.0. For OpenSSL 1.1, see here (coming soon).
Download and install the following software packages:
- 7-Zip to unpack the OpenSSL source code archive (.tar.gz)
- Perl (ActiveState) in order to build OpenSSL
- Get the OpenSSL sources from the OpenSSL Downloads Page.
- Unpack the source code package (openssl-1.0.2o.tar.gz) using 7-zip. This is a two-step process. First, expand the GZip-compressed .tar.gz, then unpack the openssl-1.0.2o.tar file, resulting in a directory named openssl-1.0.2o.
Launch a VS2015 x86 Native Tools Command Prompt and cd into the openssl-1.0.2o directory. Then run the following commands below.
Note: each configuration (static, DLL, 32-bit, 64-bit) must be built in a fresh directory.
Configure OpenSSL to be installed into C:\OpenSSL-Win32. You can of course also specify a different directory.
> perl Configure VC-WIN32 no-asm --prefix=C:\OpenSSL-Win32
> ms\do_ms
> nmake -f ms\nt.mak
This will install the libraries, executables and header files into the directory specified in the Configure step.
> nmake -f ms\nt.mak install
> nmake -f ms\ntdll.mak
This will install the libraries, executables and header files into the directory specified in the Configure step.
> nmake -f ms\ntdll.mak install
Congratulations, you have successfully built OpenSSL.
Launch a VS2015 x64 Native Tools Command Prompt and cd into a freshly extracted the openssl-1.0.2o directory. Then run the commands below.
Configure OpenSSL to be installed into C:\OpenSSL-Win64. You can of course also specify a different directory.
> perl Configure VC-WIN64A no-asm --prefix=C:\OpenSSL-Win64
> ms\do_win64a
> nmake -f ms\nt.mak
This will install the libraries, executables and header files into the directory specified in the Configure step.
> nmake -f ms\nt.mak install
> nmake -f ms\ntdll.mak
This will install the libraries, executables and header files into the directory specified in the Configure step.
> nmake -f ms\ntdll.mak install