Petrolea
December 22nd, 2011, 11:50 PM
Hi everyone!
I just started using the curl library and have no idea why this code is seg faulting. It is in D programming language.
#!/usr/bin/rdmd -w
import std.stdio;
import etc.c.curl;
int main()
{
curl_global_init(CurlGlobal.all);
auto easy_handle = curl_easy_init();
curl_easy_setopt(easy_handle, CurlOption.url, "http://24ur.com"); //SEG FAULT
curl_easy_cleanup(easy_handle);
curl_global_cleanup();
return 0;
}
It segfaults in line with curl_easy_setopt(...). Anyone knows why that might be happening?
Thanks in advance!
I just started using the curl library and have no idea why this code is seg faulting. It is in D programming language.
#!/usr/bin/rdmd -w
import std.stdio;
import etc.c.curl;
int main()
{
curl_global_init(CurlGlobal.all);
auto easy_handle = curl_easy_init();
curl_easy_setopt(easy_handle, CurlOption.url, "http://24ur.com"); //SEG FAULT
curl_easy_cleanup(easy_handle);
curl_global_cleanup();
return 0;
}
It segfaults in line with curl_easy_setopt(...). Anyone knows why that might be happening?
Thanks in advance!