e42.uk Circle Device

 

Quick Reference

Building libcurl on Windows with /MT and /MTd

Building libcurl on Windows with /MT and /MTd

libcurl is a very powerful library for sending HTTP and HTTPS client requests (and many other protocols) to servers. Building the libraries on Windows with Visual Studio using the /MT and /MTd flags is non-trivial.

  • Download and extract the CUrl source code to a temp directory. http://curl.haxx.se/download.html, in this tutorial we will be using curl-7.71.1
  • Open the Visual Studio Command Prompt (2010) (or something similar like x86 Native Tools Command Prompt for VS 2017, it will also work with x64)
  • Browse to the winbuild folder. \curl-7.71.1\winbuild.
  • Set the environment variable that will build for /MT and /MTd:

set RTLIBCFG=static

  • To build the debug version:

nmake /f Makefile.vc mode=static DEBUG=yes

  • To build the release version:

nmake /f Makefile.vc mode=static DEBUG=no

References

This is mainly just a copy of the information available at this website:

Quick Links: Techie Stuff | General | Personal | Quick Reference