I reciently installed the cURL libraries in Dev-C++ using the Packman.exe which is included in the Dev-C++ install. When I try to use #include <curl/curl.h>
I do not get an error, so I am assuming that it installed correctly. However, when I try and compile an example from the cURL website, I get the following errors:
[Linker error] undefined reference to _imp__curl_easy_init
[Linker error] undefined reference to _imp__curl_easy_setopt
[Linker error] undefined reference to _imp__curl_easy_perform
[Linker error] undefined reference to _imp__curl_easy_cleanup
The source code I am using is as follows:
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
Thank you! :)