Because the online download of Libcurl does not support gzip, had to build their own, during a lot of detours, the following is the final record of success.
The environment I am using Visual Studio 2010, Windows 7
1 Downloading files
1.1 Libcurl
Download Page http://curl.haxx.se/download.html
Http://curl.haxx.se/download/curl-7.26.0.zip
1.2 zlib
Download Page http://sourceforge.net/projects/libpng/files/zlib/
Http://sourceforge.net/projects/libpng/files/zlib/1.2.5/zlib125.zip/download
(Special reminder, do not use the 1.2.7 version of the compilation, after use found that the compilation method and file name are different)
1.3 OpenSSL
Download Page http://www.openssl.org/source/
Http://www.openssl.org/source/openssl-1.0.0c.tar.gz
(Special reminder, do not recommend 1.0.1c, although it can be compiled successfully, but can not bypass the SSL certificate, I do not know why, wasted a lot of my time)
Compiling OpenSSL also needs to download ActivePerl
Official Download Http://www.activestate.com/activeperl/downloads
: Http://downloads.activestate.com/ActivePerl/releases/5.16.0.1600/ActivePerl-5.16.0.1600-MSWin32-x86-295879.msi
X64:http://downloads.activestate.com/activeperl/releases/5.16.0.1600/activeperl-5.16.0.1600-mswin32-x64-295879.msi
2 Extracting and installing files
2.1 ActivePerl installation, double click directly next, the default setting to the end.
2.2 zlib OpenSSL Libcurl are decompressed separately, with three of them in the same level directory.
For example: d:userdeweitestcurlcurl-7.26.0, d:userdeweitestcurlopenssl-1.0.0c, d:userdeweitestcurlzlib-1.2.5
3 compilation process
3.1 zlib Compilation
Open ZLIB-1.2.5/OLD/VISUALC6/ZLIB.DSW with vs2010, choose Dll_release Compile, compile the generated zlib-1.2.5/old/visualc6/win32_dll_release/ Zlib1.lib Copy to the Curl-7.26.0/lib directory, rename to Zdll.lib (Note that this file name must be).
3.2 OpenSSL compilation
Open the CMD,CD to the openssl-1.0.0c directory;
Run the command Perl Configure Vc-win32
Run Msdo_ms.bat again
Then run "C:Program Files (x86) Microsoft Visual Studio 10.0vcvars32.bat"
Run command nmake-f Ms/ntdll.mak
Reference: Openssl-1.0.0c/install. W32
3.3 Compiling curl-7.26.0
Create a new Release.bat in the Curl-7.26.0/lib directory and enter the following:
Call "C:/Program Files/microsoft Visual Studio 10.0/vc/bin/vcvars32.bat"
Set Cfg=release-dll-ssl-dll-zlib-dll
Set openssl_path=. /.. /openssl-1.0.0c
Set zlib_path=. /.. /zlib-1.2.5
Nmake-f MAKEFILE.VC10
Save, and then run.
Wait for a while, you can go to the Curl-7.26.0librelease-dll-ssl-dll-zlib-dll directory copy file Libcurl_imp.lib and Libcurl.dll!
Reference: Curl-7.26.0/docs/install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21st 22 23 24 25 26 27 28 29 30 |
usage:nmake/f MAKEFILE.VC6 cfg=<config> <target> Where <config> is one of: Release-release Static Library Release-ssl-release Static library with SSL Release-zlib-release Static Library with zlib Release-ssl-zlib-release Static library with SSL and zlib Release-ssl-ssh2-zlib-release Static library with SSL, SSH2 and Zlib Release-ssl-dll-release Static library with dynamic SSL Release-zlib-dll-release Static library with dynamic zlib Release-ssl-dll-zlib-dll-release Static library with dynamic SSL and Dynam IC zlib Release-dll-release Dynamic Library Release-dll-ssl-dll-release Dynamic Library with dynamic SSL Release-dll-zlib-dll-release Dynamic Library with dynamic zlib Release-dll-ssl-dll-zlib-dll-release Dynamic Library with dynamic SSL and Dyna Mic zlib Debug-debug Static Library Debug-ssl-debug Static library with SSL Debug-zlib-debug Static Library with zlib Debug-ssl-zlib-debug Static library with SSL and zlib Debug-ssl-ssh2-zlib-debug Static library with SSL, SSH2 and Zlib Debug-ssl-dll-debug Static library with dynamic SSL Debug-zlib-dll-debug Static library with dynamic zlib Debug-ssl-dll-zlib-dll-debug Static library with dynamic SSL and dynamic Zlib Debug-dll-debug Dynamic Library Debug-dll-ssl-dll-debug Dynamic Library with dynamic SSL Debug-dll-zlib-dll-debug Dynamic Library with dynamic ZLIB1 Debug-dll-ssl-dll-zlib-dll-debug Dynamic Library with dynamic SSL and Dynami C zlib |
This article is from Ace software, please indicate the source and corresponding link when reproduced.
Permanent link to this article: http://www.softwareace.cn/?p=525
Http://www.yaoguangkeji.com/a_W3V5MKwb.html
VC + + Compiler Libcurl support Ssl,gzip (with script)