Answer the question
In order to leave comments, you need to log in
Why is libcurl not working?
compiled the code in ubuntu - everything works.
compiled the code in Windows (Windows XP, CodeBlocks) - "protocol https not supported or disabled in libcurl "
Here is the code section that uses libcurl:
int GetContent(const char * s)
{
char errorBuffer[CURL_ERROR_SIZE];
CURL *curl;
CURLcode result;
curl = curl_easy_init();
if (curl)
{
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
curl_easy_setopt(curl, CURLOPT_URL, s);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
result = curl_easy_perform(curl);
if (result == CURLE_OK)
cout << buffer << "\n";
else
cout << "Ошибка! " << errorBuffer << endl;
}
curl_easy_cleanup(curl);
return 0;
}
Answer the question
In order to leave comments, you need to log in
Oddly enough, you need a version of libcurl with HTTPS support.
Most of these versions need two OpenSSL files to load - libeay32.dll, ssleay32.dll.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question