Home
About
Blog
Media Gallery

libcurl libraries with openssl


I went through the hoops of compiling x86 and x64 libraries ready for static linking in VC++ projects so I could use curl for smtps. I don't particularly want to recreate these again anytime soon, so I'm posting them here for future reference. Maybe it can save other programmers some time as well. They were compiled with CURL_DISABLE_LDAP and /MT. Tested working sept 2022, by sending test mails. There may be LNK4099 warnings from missing pdb files, You can ignore those with /ignore:4099 in properties > Linker > All Options > Additional Options.

vs++ libcurl libraries.rar

readme.txt
Notes for adding libcurl to a visual studio 2022 / VC++ win32 project.

properties > VC++ Directories > Include Directories ... Add include directory here so curl/curl.h can be reached.
properties > C/C++ > Preprocessor > Add CURL_STATICLIB to Preprocessor Definitions.
properties > C/C++ > Code Generation > Multi-threaded (/MT) (personal preference).

Copy x86 or x64 .lib files to project.
These are compiled with openssl support that I needed for smtps.

properties > Linker > Input > add these...
	x86:
		libcurl.lib
		crypt32.lib
		ws2_32.lib
		wldap32.lib
		libcrypto.lib
		libssl.lib
	x64:
		libcurl_64.lib
		crypt32.lib
		ws2_32.lib
		wldap32.lib
		libcrypto_64.lib
		libssl_64.lib
		msvcrt.lib

Should now be ready to use #include <curl/curl.h>.
https://curl.se/libcurl/c/ for documentation.


Original Post: Sep 22nd, '22 12:09 CEST.
Updated: Sep 22nd, '22 17:36 CEST.

Tags: C/C++