Mam problem z instalacją CURL-a w środowisku Visual C++. Wersja środowiska, którą posiadam to 2008, system operacyjny Windows XP Pro, (32). Ściągnąłem Curla (wersja: MSVC metalink 7.19.3 devel SSL enabled Frederic Elbin 4.04 MB) oraz postępowałem (jak mi się wydaje) identycznie jak w instrukcji zamieszczonej na http://curl.haxx.se/libcurl/c/visual_studio.pdf . Pominąłem tylko pierwszy krok, który mówił o znalezieniu pliku "curllib.dsw", którego ściągnięty przeze mnie CURL nie posiadał. Doszedłem do ostatniego kroku, który polegał na skompilowaniu przykładu:
// nowy.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#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://www.cnn.com/");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
Niestety kompilator wyrzuca błędy:
nowy.obj : error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function _main
nowy.obj : error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function _main
nowy.obj : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function _main
nowy.obj : error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function _main
E:\Microsoft Visual C++ 2008\CURL\VS\nowy\Debug\nowy.exe : fatal error LNK1120: 4 unresolved externals