如何避免在Delphi中将zlib objs多次链接到二进制文件 [英] How to avoid linking zlib objs into the binary more than once in Delphi

查看:92
本文介绍了如何避免在Delphi中将zlib objs多次链接到二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找有关如何仅通过使用ZLib单元(Delphi 7)来解码gzip / deflate http编码的zlib示例。我一直在使用Indy 10,但随后遇到了一篇文章,说许多第三方组件实现了自己的zlib帮助器,最终导致多个zlib对象链接到输出文件中。我有一个庞大的项目,正在寻找减小尺寸的方法。我对二进制文件进行了搜索,结果发现至少链接了4个zlib副本。

I've been googling around for a zlib sample of how to decode gzip/deflate http encoding by only using ZLib unit (Delphi 7). I've been using Indy 10 for that but then I ran into an article saying many 3rd party components implemented their own zlib helpers eventually causing multiple zlib objects linked into the output file. I have this huge project and looking for ways to reduce the size. I did a search on the binary and turned out I had at least 4 copies of zlib linked in.

有没有一种方法可以避免将zlib obj文件链接到二进制文件中?不止一次?我可以让Indy根本不使用/导入zlib吗?

Is there a way to avoid linking zlib obj files into the binary more than once? Can I make Indy not to use/import zlib at all?

推荐答案


有没有办法避免将zlib obj文件多次链接到二进制

Is there a way to avoid linking zlib obj files into the binary more than once?

没有。链接的.obj文件是每个单元专用的。您无法从一个单元中检测到另一个单元已链接了.obj文件。

No there is not. The linking .obj files is private to each unit. There is no way for you to detect from one unit that some other unit has linked a .obj file.

这篇关于如何避免在Delphi中将zlib objs多次链接到二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆