[Interest] static qt without zlib

Tim Blechmann tim at klingt.org
Mon Dec 2 16:58:29 CET 2013


>> hmm, i might be hit by my ignorance of the win32 platform, but trying to
>> do so there seems to be a symbol mismatch: Qt5Core provides symbols like
>> _z_deflate, but my library is looking for the symbol _deflate ...
> 
> If the symbols in Qt are different, then the original problem does not 
> manifest: there is no clash.

iff all symbols are different!

after digging further into it, i found out that zlib provides a naming
mechanism, which prefixes a z_ to its symbols to avoid name clashes.
this is done by Qt's bundled zlib. unfortunately, the prefixing is not
done with z_errmsg.

therefore:
link with system zlib and qt's zlib, one will have a duplicate
definition of z_errmsg.

linking only with qt's zlib, the application (not expecting prefixed
symbols) will be missing some symbols.

one can argue if this is a bug or a feature ... for my use-case it is a
showstopper, which i worked around by fixing qt's bundled zlib.

compare:
https://bugreports.qt-project.org/browse/QTBUG-35301

cheers,
tim


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131202/83ad3019/attachment.sig>


More information about the Interest mailing list