I'm having the same problem since you found the solution, please help me out.
This is my code:
#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;
}
#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;
}
To copy to clipboard, switch view to plain text mode
it returns the same error you were having: undefined reference to `_imp__curl_easy_init'
by the way, I didn't compile the library (if it is necessary) I just downloaded and moved the curl library (that contains the curl.h, curlbuild.h) what do I need to do to make it work ? do I need to compile if yes, where do I do that, Its been days I've been looking for, But I don't understand what to do. I see something to use the mingw32-make mingw32 in the curl library but I don't get it fully. =/ please help me out, and also that CURL_STATICLIB what do I define in it? is it something in the code like this: #define CURL_STATICLIB
By the way I'm using CodeBlocks that comes with the Mingw. I would be very glad if you could help me, step-to-step.
Bookmarks