Unresolved symbols when linking a program using libcurl

I've been using static version of libcurl, and to link my program against it properly, I had to add definition:

CURL_STATICLIB

to build configuration of my project.


Besides defining CURL_STATICLIB, for me it was also necessary to link the following dependencies (including libcurl.lib or libcurld.lib):

  • Ws2_32.lib
  • Wldap32.lib

Looks like the libraries are not being successfully linked. Ensure the library directory is set to include the full path to the libcurl dll. Also make sure this library is actually added to your project.


I ran into a similar issue - found that I was referencing the 64-bit location of libcurl.lib. Changed the link directory to the 32-bit location and the project compiled perfectly.