BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

libcurl with borland c++ builder

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder
View previous topic :: View next topic  
Author Message
Dylan
Guest





PostPosted: Sat Jul 08, 2006 3:51 am    Post subject: libcurl with borland c++ builder Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.