fork(8) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4.  
  5. #include <curl/curlbuild.h>
  6. #include <curl/curlrules.h>
  7. #include <curl/easy.h>
  8. #include <curl/multi.h>
  9. #include <curl/typecheck-gcc.h>
  10. #include <curl/curl.h>
  11. #include <curl/curlver.h>
  12. #include <curl/mprintf.h>
  13. #include <curl/stdcheaders.h>
  14.  
  15.  
  16.  
  17. int main(void)
  18. {
  19. CURL *curl;
  20. CURLcode res;
  21.  
  22. curl = curl_easy_init();
  23. if(curl) {
  24. curl_easy_setopt(curl, CURLOPT_URL, "http://e...content-available-to-author-only...e.com");
  25.  
  26. /* Perform the request, res will get the return code */
  27. res = curl_easy_perform(curl);
  28. /* Check for errors */
  29. if(res != CURLE_OK)
  30. fprintf(stderr, "curl_easy_perform() failed: %s\n",
  31. curl_easy_strerror(res));
  32.  
  33. /* always cleanup */
  34. curl_easy_cleanup(curl);
  35. }
  36. return 0;
  37. }
  38.  
  39.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:5:28: error: curl/curlbuild.h: No such file or directory
prog.c:6:28: error: curl/curlrules.h: No such file or directory
prog.c:7:23: error: curl/easy.h: No such file or directory
prog.c:8:24: error: curl/multi.h: No such file or directory
prog.c:9:32: error: curl/typecheck-gcc.h: No such file or directory
prog.c:10:23: error: curl/curl.h: No such file or directory
prog.c:11:26: error: curl/curlver.h: No such file or directory
prog.c:12:26: error: curl/mprintf.h: No such file or directory
prog.c:13:30: error: curl/stdcheaders.h: No such file or directory
prog.c: In function ‘main’:
prog.c:19: error: ‘CURL’ undeclared (first use in this function)
prog.c:19: error: (Each undeclared identifier is reported only once
prog.c:19: error: for each function it appears in.)
prog.c:19: error: ‘curl’ undeclared (first use in this function)
prog.c:20: error: ‘CURLcode’ undeclared (first use in this function)
prog.c:20: error: expected ‘;’ before ‘res’
prog.c:22: warning: implicit declaration of function ‘curl_easy_init’
prog.c:24: warning: implicit declaration of function ‘curl_easy_setopt’
prog.c:24: error: ‘CURLOPT_URL’ undeclared (first use in this function)
prog.c:27: error: ‘res’ undeclared (first use in this function)
prog.c:27: warning: implicit declaration of function ‘curl_easy_perform’
prog.c:29: error: ‘CURLE_OK’ undeclared (first use in this function)
prog.c:31: warning: implicit declaration of function ‘curl_easy_strerror’
prog.c:31: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
prog.c:34: warning: implicit declaration of function ‘curl_easy_cleanup’
stdout
Standard output is empty