Skip to content

Instantly share code, notes, and snippets.

@taxilian
Created July 20, 2011 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save taxilian/1095427 to your computer and use it in GitHub Desktop.
Save taxilian/1095427 to your computer and use it in GitHub Desktop.
Building libcurl and openssl on windows statically

Building static libcurl and openssl on Windows

These instructions were tested on Windows 7 Professional w/ Visual Studio 2010

Building openssl

  1. Download the latest openssl from the website; at the time of this writing, it is 1.0.0d

  2. Extract it to your drive; I put it in c:\code\openssl-1.0.0d

  3. install ActiveState perl unless you already have a non-cygwin perl installed on windows

  4. Open a Visual Studio 2010 Command Prompt

  5. from the openssl dir, run:

     perl Configure VC-WIN32 no-shared
    
  6. Also from the openssl dir, run:

     ms\do_ms.bat
    
  7. Also from the openssl dir, run:

     nmake -f ms\nt.mak
    

Building libcurl

  1. Download the latest libcurl from the website; at the time of this writing, it is 7.21.7

  2. Edit lib\Makefile.vc10 and add the following to CFLAGS:

    /DCURL_DISABLE_LDAP /DCURL_DISABLE_TELNET /DCURL_DISABLE_DICT /DCURL_DISABLE_TFTP
    
  3. Run the following:

     set RTLIBCFG=static
     set openssl_path=C:\code\openssl-1.0.0d
     nmake VC=vc10 vc-ssl
    
@dch
Copy link

dch commented Nov 30, 2011

instead of step 2 editing the makefile you can use:

nmake VC=vc10 vc-ssl

@taxilian
Copy link
Author

very good to know! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment