On Fri, Apr 16, 2010 at 3:24 PM, Jeff Nathan <j...@snort.org> wrote:

> Adding -lz resolves these symbols which leads to my question: why
> aren't the symbols from zlib resolved during the compilation and
> linking such that an application not directly calling out to zlib need
> not link against it if it only wishes to use openssl?
>

With static libraries everything needs to be linked into the executable.
Perhaps you thought when building openssl that the functions in libz.a would
get embedded inside of libcrypto.a, but they don't.

However, if you really did want to create a static library that combines
everything from libz.a and libcrypto.a, you could do that easily enough
using the "ar" command.

Phillip

Reply via email to