RE: [xml] libxml2 on windows compilation error...



Shruti,

I'd wager that you configured libxml2 to have HTML enabled but have HTTP
parsing disabled. 

There is a problem with the generation of the libxml2 .def file. The make
procedure generates the file "libxml2.def" by running the C pre-processor on
the file "libxml2.def.src". Within "libxml2.def.src", the xmlIOHTTPxxx
functions are wrapped inside conditional blocks which look like this:

#ifdef LIBXML_HTML_ENABLED
xmlIOHTTPOpen
#endif

That is incorrect. The "ifdef" should be using LIBXML_HTTP_ENABLED, not
LIBXML_HTML_ENABLED. So the block ought to be:

#ifdef LIBXML_HTTP_ENABLED
xmlIOHTTPOpen
#endif

The correct conditionals are used in xmlIO.c. So what is happening is that
functions like xmlIOHTTPOpen are appearing as EXPORTs within libxml2.def,
but are being conditionally excluded during compilation.

There are several different ways you could fix this; any one of the
following should work:

1) Re-run configure.js to configure with HTTP enabled.
2) Fix the incorrect conditionals in libxml2.def.src.
3) Use the newest version of libxml2, which no longer uses libxml2.def to
create exports.

Date: Sun, 21 Sep 2003 23:47:21 -0700
From: Aleksey Sanin <aleksey aleksey com>
To: "Shruti Ahuja, Noida" <shruti noida hcltech com>,
      xml <xml gnome org>
Subject: [xml] libxml2 on windows compilation error...


Shruti Ahuja, Noida wrote:

Hi,
I succesfully downloaded the source for or xmlsec1-1.1.2 library. But am
unable to download the dependent libraries, i.e libxml and libxslt from
Igor's website. This might be due to some firewall settings at my
organization. I also downloaded the source for libxml but get the
following
errors while building it -

Generating Code...
       link.exe /nologo /VERSION:2.5 /LIBPATH:binaries /LIBPATH:.\lib
/OPT:NOWIN98 /DLL /DEF:libxml2.int\libxml2.def
/IMPLIB:binaries\libxml2.lib
/OUT:binaries\libxml2.dll libxml2.int\c14n.obj libxml2.int\catalog.obj
libxml2.int\debugXML.obj libxml2.int\DOCBparser.obj
libxml2.int\encoding.obj
libx
ml2.int\entities.obj libxml2.int\error.obj libxml2.int\globals.obj
libxml2.int\hash.obj libxml2.int\HTMLparser.obj libxml2.int\HTMLtree.obj
libxml2.int\list.obj libxml2.int\nanoftp.obj libxml2.int\nanohttp.obj
libxml2.int\parser.obj libxml2.int\parserInternals.obj
libxml2.int\relaxng.obj libxml2.int
\SAX.obj libxml2.int\threads.obj libxml2.int\tree.obj libxml2.int\uri.obj
libxml2.int\valid.obj libxml2.int\xinclude.obj libxml2.int\xlink.obj
libxml2.int\xmlIO.obj libxml2.int\xmlmemory.obj libxml2.int\xmlreader.obj
libxml2.int\xmlregexp.obj libxml2.int\xmlschemas.obj
libxml2.int\xmlschemastypes.ob
j libxml2.int\xmlunicode.obj libxml2.int\xpath.obj
libxml2.int\xpointer.obj
libxml2.def : error LNK2001: unresolved external symbol enum
libxml2.def : error LNK2001: unresolved external symbol xmlIOHTTPClose
libxml2.def : error LNK2001: unresolved external symbol xmlIOHTTPMatch
libxml2.def : error LNK2001: unresolved external symbol xmlIOHTTPOpen
libxml2.def : error LNK2001: unresolved external symbol xmlIOHTTPOpenW
libxml2.def : error LNK2001: unresolved external symbol xmlIOHTTPRead
libxml2.def : error LNK2001: unresolved external symbol
xmlRegisterHTTPPostCallbacks
binaries\libxml2.lib : fatal error LNK1120: 7 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file 


Can you suggest me the solution to tis problem.

Thanks,
Shruti.
 

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]