 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dylan Guest
|
Posted: Sat Jul 08, 2006 3:51 am Post subject: libcurl with borland c++ builder |
|
|
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,
"http://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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|