libcurl with borland c++ builder 6


2006-07-08 06:36:21 AM
cppbuilder15
Hi,
i'm studying how to use libcurl with an application, but i've got some
problems:
when i compile the project,
there are some errors:
Build
[Linker Error] Unresolved external '_curl_easy_init' referenced from
C:\DOCUMENTS AND SETTINGS\DYLAN\DESKTOP\PROGETTI\CURL PROJECT\UNIT1.OBJ
[Linker Error] Unresolved external '_curl_easy_setopt' referenced
from C:\DOCUMENTS AND SETTINGS\DYLAN\DESKTOP\PROGETTI\CURL PROJECT\UNIT1.OBJ
[Linker Error] Unresolved external '_curl_easy_perform' referenced
from C:\DOCUMENTS AND SETTINGS\DYLAN\DESKTOP\PROGETTI\CURL PROJECT\UNIT1.OBJ
[Linker Error] Unresolved external '_curl_easy_cleanup' referenced
from C:\DOCUMENTS AND SETTINGS\DYLAN\DESKTOP\PROGETTI\CURL PROJECT\UNIT1.OBJ
The sourcecode of the application is:
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
char *postthis="username=USERNAME&password=PASSWORD";
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL,
"megainternet.fastwebnet.it/home ");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
/* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
itself */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(postthis));
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
Thank You in advance,
Dylan