zlib + 马斯姆
zlib 是否可以与 masm 一起使用,而无需所有 c 运行时库(例如 msvcrt.dll 等)? 如果是这样,你能告诉我怎么做吗?
Can zlib be used with masm without all the c runtime libraries such as msvcrt.dll and many others?
If so, can you tell me how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
zlib 确实包含针对各种处理器和汇编器(包括 masm)的优化汇编器。 但该汇编器仅适用于 zlib 的最内部部分。 换句话说,它不是用汇编程序完全重新实现 zlib。 因此,使用 masm 块不会改变 zlib 的依赖关系。
也就是说:应该可以静态链接您的应用程序,包括您正在使用且没有外部依赖项的任何 C 运行时库功能。
话又说回来,msvcrt.dll 几乎存在于任何地方的每个 Windows 系统上,那么您为什么要这样做呢?
zlib does include optimised assembler for various processors and assemblers including masm. But that assembler is only for the innermost parts of zlib. It's not, in other words, a complete reimplementation of zlib in assembler. Using the masm chunks therefore won't change the dependencies that zlib has.
That said: it should be possible to statically link your application, including any of the C runtime library features that you're using and not having external dependencies.
Then again, msvcrt.dll is present on pretty much every Windows system anywhere, so why would you want to do this?
Zlib 不是 C++ 库,所以我不明白为什么需要 C++ 运行时库才能使用它。
我认为你指的是 C 库。
Zlib is not a C++ library so I don't understand why you would need C++ runtime libraries to use it.
I think you mean C libraries.
这取决于你想做什么,如果你只是想解压缩数据,我会推荐 Joergen Ibsen 的 TINF 库,ZLIB 包中的那些汇编实现非常无用,会让你头疼;)
it depends on what you want to do, if you just want to decompress data, i would recommend TINF library from Joergen Ibsen, those assembly implementations from ZLIB package are pretty useless and will give you a headache ;)