curl-library
Using libcurl with Borland - how?
Date: Thu, 12 Feb 2004 10:12:46 +0100
I've downloaded the precompiled version of libcurl (7.11.0) for win32.
I'm making a console app. and have included the curl*.h files in my project and also the libcurl.lib
The libcurl.dll is in my application directory. (I also tried including the dll in the application).
When I compile the example:
//---------------------------------------------------------------------------
#pragma hdrstop
#include "curl.h"
#include "easy.h"
#include "stdcheaders.h"
#include "types.h"
#include "multi.h"
#include "mprintf.h"
//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. This URL can
just as well be a https:// URL if that is what should receive the
data. */
curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi");
/* Now specify the POST data */
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
//---------------------------------------------------------------------------
I get the following error:
"libcurl.lib contains invalid OMF record, type 0x21 (possibly COFF)."
I tried converting to COFF (what ever that meens) but that seemed to make things worse.
Does anyone know what I need to do?
Thx. Gretter.
Received on 2004-02-12