How to compile OpenSSL with Visual Studio

Hi there!

Sometimes there is not precompiled OpenSSL available for the latest Visual C++ runtime, and you need it.

Here it is a quick guide to do it. This is to compile OpenSSL 32 bit shared DLLs with CAPI engine, for 64 bit or static OpenSSL libraries just read OpenSSL makefile or installation doc to add these options. Of course we need Visual Studio (C/C++) installed.

1. Download the OpenSSL sources you want to compile and unzip it in a folder.

2. Download Perl and install it.

3. Open a Developer Command Prompt within Visual Studio.

4. Change the directory to the base path where you unzipped OpenSSL sources.

5. Create a folder, for example: "c:\OpenSSL-Win32_custom_compiled\shared-release"

5. Type: "perl Configure VC-WIN32 --prefix=c:\OpenSSL-Win32_custom_compiled --openssldir=c:\OpenSSL-Win32_custom_compiled\SSLcfg no-asm enable-capieng".

6. If there was not any fatal error, just type the following: "nmake install". And just wait, it depends on your fast or slow machine.

7. Check subfolders at the path we specified before: (/bin), (/lib) or (/include) with files like "libcrypto-1_1.dll", "libssl-1_1.dll", "libcrypto.lib", "libssl.lib" and the headers files.

That's all.

No hay comentarios:

Publicar un comentario

How to compile OpenSSL with Visual Studio

Hi there! Sometimes there is not precompiled OpenSSL available for the latest Visual C++ runtime, and you need it. Here it is a quick gu...