This article refer to http://blog.csdn.net/fragmentalice/article/details/39430293
Thank you very much.
A few HTTP GET requests are used in the company project, using the Libcurl Open Source Library.
When new requirements are connected to third-party interfaces, they need to be changed to support HTTPS, and the previous Libcurl libraries are not supported.
So to recompile one.
The specific compilation environment is as follows:
Hardware:
Cpu:intel Core (TM) i3-3250 CPU @ 3.00GHz
RAM:4GB (3.41GB available)
GPU: Onboard integrated graphics
Software:
Windows 7 SP1
Visual Studio 2010
While Libcurl sends HTTPS requests, it relies on OpenSSL and zlib.
So compile these two first. The process is as follows:
1. First compile OpenSSL.
A. Using the tool ActivePerl
Http://www.activestate.com/activeperl/downloads
Choose Version 5.22.0.2200 Windows x86 platform based on your computer environment
Activeperl-5.22.0.2200-mswin32-x86-64int-299195.msi Direct installation, default configuration, next.
Note The installation directory is C:\Perl\
After the installation is complete, there is no Perl command on the DOS command line. Because the environment variable does not take effect immediately, you need to log off. Or:
Find Perl.exe, found in C:\Perl\bin\perl.exe
In environment variables, add user variable name, Perl variable value C:\Perl\site\bin;
After determining, open the DOS command line input set Perl=c:\perl\site\bin
Close the DOS command window and reopen one to find that Perl is available.
B. Download the source code from the official website.
http://www.openssl.org/source/Download 1.0.2E This version fixes the Heartbleed vulnerability.
Https://www.openssl.org/source/openssl-1.0.2e.tar.gz
(without the latest openssl-fips-2.0.10 is because this I tried, compile failed.) Time is not allowed to pursue specific reasons. )
C. Compilation process
Perl Configure vc-win32 no-asm--prefix=d:/dev/vs/http/---install
Nmake-f Ms\ntdll.mak Test
Can test if there is a build success
Nmake-f Ms\ntdll.mak Clean
Can clean up compiled results
Nmake-f Ms\ntdll.mak Install
Compilation results are saved to the specified directory D:/dev/vs/http/ssllib
Build the results Directory
Note 1:nmake tools in the Visual Studio installation directory
"D:\Program Files\Microsoft Visual Studio 10.0\vc\bin\nmake.exe"
NOTE 2: This machine does not have nasm so the first sentence adds the parameter no-asm. Otherwise nmake-f Ms\ntdll.mak will error error a2070:invalid instruction operands and so on.
4. Finally
Verification code, I was using
http://blog.csdn.net/sunflover454/article/details/49030803
Hereby thank
Libcurl with HTTPS supported under Windows compilation