RE: [xml] DUmb questions about using libxml2 with Borland C_++



To try to clarify things a bit on use of libxml2 with BCB:

While it is possible to use Igor's pre-compiled Win32 libxml2 DLL with BCB,
there are a couple of problems with doing so. The first problem is that
Borland uses OMF rather than COFF format, so the import library provided
with the DLL won't work directly with the Borland compiler. Fortunately,
Borland provides a utility called "coff2omf" which can be used to generate
an import library in Borland format from the original. The second problem is
not so readily circumvented: some of the functions in the libxml2 API (e.g.,
xmlDebugDumpString) take a FILE * as a parameter. Since a FILE struct in BCB
is not equivalent to one in MSVC, these functions cannot be safely called
from a BCB application. As it happens, this means that nearly all the
standard test applications, like xmllint, won't work if you use this
approach.

However, it's easy enough to build libxml2 using BCB, and that's probably
the best thing to do if you're working with BCB exclusively. Just watch out
for potential problems with DLL conflicts: if you have other applications
installed which make use of the MSVC version of libxml2, they won't work
very well if they happen to load a BCB version of the DLL.

On Tue, Nov 25, 2003 at 09:06:43AM +1000, Redding, Matthew wrote:
HI All, 

I have been hunting around for info on using the library
with Borland C++.  No success on the newsgroups, can't even find good 
documentation on using third party libraries with BOrland (why is that not
in the 
docs that come with the program?  Support for open source is always
better).  
I have it going nicely at home, under red hat, 
but here I have to operate in an MS environment :{.

I see that there is a web site with win ports, but 
I am not sure that these libs will work with borland.
Will they, and what do I have to do to get them to work?

If they won't work, I suppose I need to work from the source...and
I am likely to need advice on how to use the make file in the borland
environment.

I guess I might be pushing my luck asking these questions, but 
there might be someone else here who has just been through this sort of
thing.

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]