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

Re: Static Linking

From: Dave Lacy Kusters <dkusters@cadrc.calpoly.edu>
Date: Tue, 18 Jul 2000 13:15:28 -0700 (PDT)
To: Elliot Yan <lyan@centergate.com>, www-lib@w3.org
cc: dkusters@polymail.cpunix.calpoly.edu
Message-ID: <Pine.GHP.4.03.10007181306220.6607-100000@keroppi>
On Tue, 18 Jul 2000, Elliot Yan wrote:

> I was reading w3c mailing and notice that you had a problem static
> linking w3c on linux.
> 
> I have the similar problem.  Could you share you solution if you found
> the fix ?

I hope you don't mind me posting this to the mailing list, but I
think others may benefit from this.

I realize that by describing my method, I may be shot by the libw3c
developers, but I'll take that risk.  My deadline was coming up, and
the -static flag was causing troubles with unresolved symbols.  I
thought that maybe the compiled versions were the cause, so I first
downloaded the source.  After recompiling w3c, I tried relinking my
program.  I was still getting unresolved symbols.  I searched by .a's
and specified all of them explicitly.  I was still getting unresolved
symbols in XML.  I placed the XML libraries in the link order several 
times and ended up with only more unresolved symbols.

The deadline was ticking (only hours away), so I looked carefully at
the unresolved symbols.  They were all in HTInit.c.  So, I went into
HTInit.c and commented out the usage of the unresolved symbols (I
don't have my source at this computer, sorry).  They all dealt with 
the initialization of XML related functionality (which I didn't need).
I recompilied w3c, relinked my executable, and ran my regression
tests.  Everything worked.

So, I resolved the unresolved symbols not by defining them, but by
removing the references.

Dave (ducking as not to be hit by flying bricks) Lacy Kusters
Received on Tuesday, 18 July 2000 16:17:54 GMT

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