Witam,
Z tej strony: http://curl.haxx.se/download.html pobrałem curl-7.28.0.zip, rozpakowalem itd.
W opcjach kompilatora dodałem katalog C:\curl-7.28.0\include
ALe przy kompilowaniu :
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
Pojawiają się takie błędy:
C:\curl-7.28.0\include\curl\curlbuild.h|580|warning: ISO C90 does not support 'long long'|
C:\Users\Bartek\Desktop\curl.o:curl.c|| undefined reference to `_imp__curl_easy_init'|
C:\Users\Bartek\Desktop\curl.o:curl.c|| undefined reference to `_imp__curl_easy_setopt'|
C:\Users\Bartek\Desktop\curl.o:curl.c|| undefined reference to `_imp__curl_easy_perform'|
C:\Users\Bartek\Desktop\curl.o:curl.c|| undefined reference to `_imp__curl_easy_cleanup'|
C:\Users\Bartek\Desktop\curl.o:curl.c|| undefined reference to `_imp__curl_easy_strerror'|
||=== Build finished: 5 errors, 1 warnings ===|
Jak rozumiem jest to problem z linkerem. Tylko w ściągniętej paczce nie mam w ogóle żadnego pliku *.a. Jak to rozwiązać?