./configure make make install
#include <stdio.h> #include <curl/curl.h> int main() { CURL *curl; CURLcode res; curl = curl_easy_init(); if (!curl) { printf("Erreur lors de l'initialisation de cURL\n"); return 0; } curl_easy_setopt(curl, CURLOPT_URL, "127.0.0.1"); res = curl_easy_perform(curl); curl_easy_cleanup(curl); return 0; }
gcc test_curl.c -o curl -lcurl
./curl: error while loading shared libraries: libcurl.so.3: cannot open shared object file: No such file or directory
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question[root@localhost lib]# ls *curl* libcurl.so.2@ libcurl.so.2.0.2*
[thomas@localhost test_dwnl_page_html]$ gcc test_curl.c -o curl -lcurl -static /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status