W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2002

Re: Undefined symbol HTXML_new while linking.

From: Richard Atterer <libwww@list02.atterer.net>
Date: Fri, 16 Aug 2002 15:47:31 +0200
To: Tanmay Patwardhan <tpthesis@hotmail.com>
Cc: www-lib@w3.org
Message-ID: <20020816134731.GD905@nenya.lan>

On Thu, Aug 15, 2002 at 04:17:25PM -0500, Tanmay Patwardhan wrote:
> Undefined symbol HTXML_new
> first referenced in file
> /home/patwarta/libwww_sun_solaris/lib/libwwwapp.a(HTInit.o)
> 
> I noticed some messages posted earlier on this, but no solutions. Does 
> anyone have an idea how I can overcome this?

I had a problem like that with my libwww packages for Debian Linux. 
However, it happened with dynamic libraries - I'm not sure how one can
manage to do the same with static linking.

In my case, the old libwww Debian package was compiled without XML
support, the new version with XML support. By default, programs linked
against the old packages would have failed with link errors for
"HTXML_new". IIRC, the cause is some #ifdef in HTInit.c which only
calls HTXML_new() if libwww has been configured with XML support. 

I think the solution for you is to recompile libwww with XML support,
and then to recompile your application.

With my Debian packages, it was a bit more complicated: The
applications linked against the old version did not link against
libwwwxml, because obviously libwwwxml was not present at all when
they were compiled. Additionally, it was not desirable to recompile
them. I had to add a dependency of libwwwapp on libwwwxml, so that
when the old program loaded the new libwwwapp.so, the new libwwwapp
would pull in libwwwxml. I did this with a "libwwwapp_la_LDFLAGS =
-lwwwxml" line in src/Makefile.am.

Hope this helps,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  CS student at the Technische  |  GnuPG key:
  | \/¯|  http://atterer.net  |  Universität München, Germany  |  0x888354F7
  ¯ '` ¯
Received on Friday, 16 August 2002 09:59:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:42 GMT