Created
February 4, 2011 20:19
-
-
Save zcopley/811693 to your computer and use it in GitHub Desktop.
Notes on building curl 7.21.3 with Visual Studio 2005
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This branch has a version of curl-7.21.3 with a new patch to do SPNEGO/GSS-API Negotiate via Windows SSPI applied to it, and modified make files for VC++ 8 (Visual Studio 2005). I've successfully built a working libcurl.dll and curl.exe with SSL and zlib using it. | |
https://github.com/zcopley/curl/tree/vs2005 | |
External dependency notes | |
------------------------- | |
* SSL - I used OpenSSL 1.0.0c (Win32OpenSSL-1_0_0c.exe) from here: http://www.shininglightpro.com/products/Win32OpenSSL.html | |
* zLib - This one is tricky. I needed to compile this from source, because none of the precompiled DLLs floating around would work. I used v1.2.5 from here: http://zlib.net/zlib-1.2.5.tar.gz The magic incantation is to build it (from the root zLib source dir) is: | |
nmake -f win32/Makefile.msc OBJA="inffast.obj" | |
Note: to get nmake to run, you have to first run the environment setup batch file, vsvars32.bat. On my system it was here: | |
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat | |
Once that compiles cleanly I made a zlib distribution-ish directory for curl to link against and copied these files into it (looks like this): | |
zlib/ | |
zlib1.dll | |
zlib1.pdb | |
zlib/include/ | |
zconf.h | |
zlib.h | |
zlib/lib/ | |
zdll.exp | |
zdll.lib | |
zlib.lib | |
zlib.pdb | |
Compiling Curl | |
-------------- | |
Edit the patched Makefile.vc8 in the lib and src directories to set the path to SSL and zLib libraries. | |
To build the whole #! as a bunch of independent .dlls use the Makefile in the top level curl src dir with this target: | |
nmake -f Makefile vc-dll-ssl-dll-zlib-dll | |
That should build everything, and you should end up with curl.exe in the curl-7.21.3/src and libcurl.dll and libcurl_imp.lib in curl-7.21.3/lib. | |
Copy those files into a new directory for testing. You'll also need the zlib1.dll and OpenSSL dlls... Oh, and because this is VC8 you'll need the C runtime dll, msvcr80.dll, which should be somewhere in your Visual Studio directory tree. I think you can also get it by downloading the "Redistibutables" package from MSFT: | |
http://www.microsoft.com/downloads/en/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en | |
Okay, you should end up with a directory with these dlls and curl.exe in it: | |
curl.exe | |
libcurl.dll | |
libcurl_imp.lib | |
libeay32.dll | |
msvcr80.dll | |
ssleay32.dll | |
zlib1.dll | |
And you can finally run curl.exe to give it a try. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment