Hello,
I'm trying to use libcurl with a program I'm making, but I'm having some problems with it. So far I've only tried the examples from libcurl's website, but they crash as soon as the program gets to the curl initialization.
My current code:
#include <iostream>
#include <curl/curl.h>
int main(int argc, char *argv[])
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl)
{
curl_easy_setopt(curl, CURLOPT_URL, "http://garrysmod.fi/");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
I have also made sure the compiler and linker can find the resources, and that the dll file (libcurl.dll) is in the program's folder, yet it keeps crashing. I tried debugging with VS2010, and it gave me an "access violation" error at the initialization function curl_easy_init().
Any help would be appreciated!