This is a short note about building cURL with SSL support on Windows
- from http://swatrant.blogspot.in/2013/06/how-to-build-curl-static-library-with.html
- see also https://bitbucket.org/triton/premake-cs-fixes/commits/460a6580b6ac2ca58e301026037be7082751b63f#Lpremake5.luaT53
- cURL source: Download latest cURL source from here.
- Microsoft Visual C++ 2008 or 2010 Express Edition: It looks like 2008 Express Edition is no longer available, but 2010 Express Edition can be downloaded from here.
- Win32 OpenSSL:
- Download Win32 OpenSSL installer and Visual Studio redistributable from here - these are Win32 OpenSSL v1.0.1e and Visual C++ 2008 Redistributables at the time of this writing.
- Install Win32 OpenSSL; by default it installs to C:\OpenSSL-Win32.
- Install Visual C++ 2008 redistributable.
-
Run Visual Studio 2008 Command Prompt from Start Menu > All Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools. Or, Visual Studio 2010 Command Prompt if you're using Visual C++ 2010.
-
Navigate to winbuild sub-directory in cURL source directory, and issue following command:
-
nmake /f Makefile.vc mode=static WITH_SSL=static WITH_DEVEL=C:\OpenSSL-Win32 VC=X ENABLE_SSPI=no ENABLE_IDN=no ENABLE_WINSSL=no DEBUG=no MACHINE=x86 GEN_PDB=no ENABLE_IPV6=yes
-
Note: In VC=X, replace X with 9 for Visual C++ 2008 or 10 for Visual C++ 2010.
-
Once build is complete, cURL static libraries would be copied to builds sub-directory in cURL source directory.
-
Additionally, define CURL_STATICLIB in your app before linking.