Yes, I am aware that this is a linker error to the libcurl.lib I assume? I've tried downloading libcurl from a different source and put it in different places.
These are the errors:
LibFuckingCurl.obj : error LNK2019: unresolved external symbol __imp__curl_easy_strerror referenced in function _main
and 4 more of the same kind.
This is the sample code
#include <stdio.h>
#include <curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if (res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
Properties for project C/C++ General -> Additional Include Directories -> C:/Project/libcurl/include
Linker General ->Additional Library Directories -> C:/Project/libcurl/lib
Input -> Additional Dependencies -> libcurl.lib
Commandline: Here I can read that libcurl.lib is stated
Assuming this structure:
Project
lib
libcurl.dll
libcurl.lib
... dll's
include
curl.h
curlbuild.h
... all the header files
VisualStudio (where VS puts the project)
I also tried putting the includes in the VC++ option for directory and library path. I've read numerous guides, posts, people who had the same problem and forgot to include the libcurl.lib
I downloaded one of the prebuilt versions of libcurl because CMake almost killed me yesterday.