Re: Win32 linking problems after 5.3.1 upgrade

>>>>> Steinar Bang <sb@metis.no>:

>>>>> jose.kahan@w3.org:
>>> >>>>> Steinar Bang <sb@metis.no>:
>>> Hm... I found it I think:
>>> <http://dev.w3.org/cvsweb/libwww/Library/src/HTZip.c.diff?r1=2.8&r2=2.8.4.1>

>>> I'm not sure it's relevant for me, since my zlib is static.  Should
>>> I make zlib a DLL?  I worry that this might affect other modules of
>>> my program using it.

>> My Amaya zlib is static too. The best way to know what happens is to
>> give it a try :)

> True. :-)

> Unfortunately it didn't work.  I still get the missing symbols:
> 	HTZip.obj : error LNK2001: unresolved external symbol _inflateEnd@4
> 	HTZip.obj : error LNK2001: unresolved external symbol _inflate@8
> 	HTZip.obj : error LNK2001: unresolved external symbol _inflateInit_@12

[snip!]
> Anyone know of a tool similar to "nm" for Win32?  Ie. something that
> can dump the symbols in a .lib?

Er... well... cygwin "nm" would do the trick... and did! ;-)

Here are the definitions:
	00000000 T _inflate
	00000000 T _inflateEnd
	00000000 T _inflateInit2_
	00000000 T _inflateInit_
note the missing "@" followed by a number, which look like the result
of a .def file on DLL contents.

So I reversed the diff over, sort of.  I defined ZLIB_DLL if
WWW_WIN_DLL is _not_ defined:

#ifdef WWW_MSWINDOWS
#ifndef WWW_WIN_DLL
#define ZLIB_DLL
#endif /* WWW_WIN_DLL */
#endif

This made the DLL link.

I guess this is the wrong approach, because the right thing to do
would be to define ZLIB_DLL if one know that this is a DLL.  An
whether zlib is a DLL or not has nothing to do with whether libwww is
a DLL or not.

But hey!  Whatever works.

Received on Wednesday, 25 October 2000 06:20:41 UTC