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



On Wed, Nov 26, 2003 at 11:10:42AM +1100, Eric Zurcher csiro au wrote:
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.

  Thanks Eric,
 
 providing these informations on the list allow them to be archived
and indexed and will help future users,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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