Compile OpenSSL in Windows and openssl in windows
Brief Introduction
OpenSSL is an open-source third-party library that implements SSL (Secure SocketLayer) and Transport Layer Security (Transport Layer Security) Protocols and is widely used by enterprises. For general developers, it is easy to download compiled OpenSSL libraries on Win32 OpenSSL. For advanced development users, you may need to modify or crop OpenSSL appropriately, so compiling it becomes a key issue. The following describes how to compile the OpenSSL library on Windows.
Procedure
After completing all the above steps, we can decompress the OpenSSL package (decompress to: D:\openssl-1.0.2l
), You can compile it after modifying it. The decompressed directory contains two files: INSTALL. W32 and INSTALL. W64. Open any file and you will see the steps for compiling OpenSSL.
Note:
The above is the release library. If the debug library is compiledVC-WIN32
Changedebug-VC-WIN32
You can. Also Be sure to note that VC-WIN32 case cannot be wrong.
If the static library is compiled, usems\nt.mak
Replacems\ntdll.mak
You can.
If a database without Assembly support is generated, use the above steps 2nd and 3perl Configure VC-WIN32 no-asm --prefix=D:\OpenSSL
Andms\do_ms
Replace.
In D:\openssl-1.0.2l\tmp32dll
The folder contains the corresponding assembly files.
In step 2, various undefined or link failure errors may occur during compilation. To find the desired file, you need to modify the path environment variable and add the lib and include environment variables. My changes are as follows. You can add D: \ visualstudio2017 \ Common7 \ IDE by referring to the changes in your machine environment;
D: \ visualstudio2017 \ VC \ Tools \ MSVC \ 14.10.25017 \ bin \ HostX86 \ x86;
D: \ visualstudio2017 \ VC \ Tools \ MSVC \ 14.10.25017 \ bin \ HostX86 \ x64;
C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v7.1A \ Bin;
C: \ Program Files \ NASM; include content: C: \ Program Files (x86) \ Windows Kits \ 10 \ Include \ 10.0.14393.0 \ ucrt;
C: \ Program Files (x86) \ Windows Kits \ 10 \ Include \ 10.0.14393.0 \ um;
C: \ Program Files (x86) \ Windows Kits \ 10 \ Include \ 10.0.14393.0 \ shared;
D: \ visualstudio2017 \ VC \ Tools \ MSVC \ 14.10.25017 \ include
Lib content: D: \ visualstudio2017 \ VC \ Tools \ MSVC \ 14.10.25017 \ lib \ x86;
C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v7.1A \ Lib;
C: \ Program Files (x86) \ Windows Kits \ 10 \ Lib \ 10.0.14393.0 \ ucrt \ x86
If you encounter other strange problems, you are advised to search more. Because this library is very common, there are many similar problems on the internet, I encountered a lot of pitfalls during installation, which were not listed one by one in the previous article, with the help of a lot of network power.
Reference: http://blog.csdn.net/liang19890820/article/details/51658574