[Help-gnutls] Re: statically linked libgnutls doesn't pull in zlib
Simon Josefsson
jas at extundo.com
Fri Aug 18 10:47:07 CEST 2006
"kyle cronan" <kyle at pbx.org> writes:
> Hi everyone,
>
> This is really pretty minor, but when I tried to link my application
> statically I got some undefined symbols, such as deflate, that are
> part of zlib. So I had to add this to my application's dependencies
> even though I don't use zlib directly.
>
> I see that in the libgnutls.la file, it has
>
> dependency_libs=' -L/usr/lib -lz /usr/lib/libgcrypt.la -lnsl -lgpg-error '
>
> So I don't know why those symbols don't end up in libgnutls.a. I just
> thought I'd post in case somebody knows an easy fix.
Hi! Looking at the libgnutls.a installed on my system, it doesn't
have libz symbols either:
jas at mocca:~/src/gnutls$ nm -B ~/lib/libgnutls.a |grep deflate
U deflate
U deflateEnd
U deflateInit2_
jas at mocca:~/src/gnutls$
Isn't the normal procedure that, if you use static linking, you have
to link directly to a library, and all its dependencies?
I think that if you use libtool to link your static application, it
should have taken care of this.
/Simon
More information about the Gnutls-help
mailing list