[xml] RE: Compiling libxml2 with zlib (1.2.1) in borland



Jose,

The problem you describe is the result of different threading models being
used in the compilation of zlib and libxml2. The Borland Makefile for zlib
1.2.1 (win32\makefile.bor) is not configured to support multiple threads. In
contrast, the default for libxml2 is to support multiple threads. 

The Borland libraries treat "errno" differently in the threaded and
non-threaded versions: it's an extern int in the single-threaded version,
and an lvalue from a function call in the multithreaded version. A bit of
behind-the-scenes name decoration helps the linker avoid confusing the two.

The best solution is probably to modify the zlib compilation to make use of
multiple threads. All you need to do is add an additional option to the
CFLAGS in the makefile. That is, change the line in win32\makefile.bor that
reads:

CFLAGS  = -a -d -k- -O2 $(LOC)

to:

CFLAGS  = -a -d -k- -O2 -tWM $(LOC)

Then rebuild zlib from scratch.

If this doesn't work for you, I suggest that you contact me offlist since
this is starting to get rather remote from libxml2 itself.

-----Original Message-----
From: "Jose Fco Gomez" <jose_f terra es>
To: <xml gnome org>
Date: Wed, 10 Dec 2003 11:31:56 +0100
Subject: [xml] Compiling libxml2 with zlib (1.2.1) in borland

Hello

I try to compile libxml2 with zlib, but linking I obtain an error while
linking:

Error: Unresolved external '_errno' referenced from
C:\FUENTES\LIBRERIAS\XML\ZLIB_1.2.1\ZLIBOMF.LIB|Gizo

I can compile without poblems lixbml2 (cvs-snapshot) without zlib, but 
when I try to use zlib I can't compile the library. Can anybody help me?


For Zlib I use the sourcecode from: http://www.gzip.org/zlib/

I use Borland C++ Builder 5

Best regards


Eric Zurcher
CSIRO Livestock Industries
Canberra, Australia
Eric Zurcher csiro au



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]