cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Newbie Proglem with Compile

From: Guenter <lists_at_gknw.net>
Date: Wed, 05 Jan 2011 05:12:44 +0100

Hi Mel,
Am 04.01.2011 23:00, schrieb Medsyntel_at_aol.com:
> I'm a newbie with Curl, but use Borlands/BCC55 as the final compiler
> for my CGI app executable
>
> I'd like to build the libcurl library and link it in with my other
> libs. So, I downloaded the latest version of libcurl, and then I got into the
> C:\curl\ ..\lib sub-dir on my Windows XP Pro (sp3) machine and enterd the
> following command:
>
> C:\borland\bcc55\bin\make -f Makefile.b32
>
> The compile went perfectly for approx four C modules, then crashed
> while compiling progress.c !
>
> The error message was:
>
> progress.c:
> Error E2451 progress.c 74: Undefined symbol 'ONE_KILOBYTE' in function
> max5data
> Error E2451 progress.c 77: Undefined symbol 'ONE_KILOBYTE' in function
> max5data
>
> *** 2 errors in Compile ***
>
> I note that the symbol 'ONE_KILOBYTE' *is* defined in lines about the
> offending ones.
yes, but it seems that Borland doesnt understand the CURL_OFF_T_C*
macros defined in ./include/curl/curlrules.h ...
for now until we found something better I think you can just go with:
--- include\curl\curlrules.h.orig Wed Mar 31 20:40:39 2010
+++ include\curl\curlrules.h Wed Jan 05 04:43:55 2011
@@ -222,8 +222,12 @@
  # define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix
  #endif
  #define __CURL_OFF_T_C_HELPER1(Val,Suffix)
__CURL_OFF_T_C_HELPER2(Val,Suffix)
+/*
  #define CURL_OFF_T_C(Val)
__CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T)
  #define CURL_OFF_TU_C(Val)
__CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU)
+*/
+#define CURL_OFF_T_C(Val) Val
+#define CURL_OFF_TU_C(Val) Val

  /*
   * Get rid of macros private to this header file.

this passes the process.c break ...
but then next you will face a break with sockaddr.h; for this you need
to fix ./lib/config-win32.h:
--- lib\config-win32.h.orig Fri Dec 03 04:00:10 2010
+++ lib\config-win32.h Wed Jan 05 04:48:07 2011
@@ -357,7 +357,7 @@
  /* ---------------------------------------------------------------- */

  /* Define this if you have struct sockaddr_storage */
-#ifndef __SALFORDC__
+#if !(defined(__SALFORDC__) || defined(__BORLANDC__))
  #define HAVE_STRUCT_SOCKADDR_STORAGE 1
  #endif

I will commit this change asap so it appears in next snapshot.

Next break is in ldap.c, and I dont have the mood currently to check if
the Borland headers are sufficient for our LDAP support - though I guess
not; and anyway you speak of a CGI so unlikely you will need LDAP there,
or? So just disable it in Makefile.b32:
--- lib\Makefile.b32.orig Wed Mar 31 20:40:39 2010
+++ lib\Makefile.b32 Wed Jan 05 04:53:14 2011
@@ -44,6 +44,8 @@
  # If you build with SSL support, set WITH_SSL=1
  DEFINES = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL

+DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP
+
  !ifdef WITH_ZLIB
  DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
  INCDIRS = $(INCDIRS);$(ZLIB_PATH)

if time permits I will check if we need to disable LDAP completely, or
if we should make it configurable there in Makefile.b32 ...

with these changes I got a working curl.exe:
curl 7.21.4-20110105 (i386-pc-win32) libcurl/7.21.4-20110105
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Features: AsynchDNS

so I assume that the lib is fine too ...

@Yang: hope you read that here, and can take a look at the macros in
curlrules.h and probably have an idea what we can do here ...

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-05