Mac Xcode Zlib 链接器错误
我需要一些帮助。我刚刚开始接触 Mac 开发。这是来自 Windows 的移植,我即将完成。我正在尝试链接到 ZLib,因为我有一个依赖于它的应用程序。我正在创建多个具有相当简单的层次结构的库。不管怎样,重要的是,当我尝试链接到 ZLib 时遇到链接器错误。我已添加 libz.dylib 作为框架并将其设置为正确的目标,但我对 ZLib 的调用收到“未找到符号”错误。我尝试过使用 Z_PREFIX 标志,但没有成功。我已将 zlib 的路径设置为我的库搜索路径,即使我认为我不需要它(/usr/lib..但我认为它有一个绝对路径)。它在我的目标中显示为链接二进制文件,并列在列表顶部,这让我认为链接顺序不是问题。我链接到的唯一标头是 zlib.h,我什至将其包含到同一目标中。但是,无论我尝试什么,我仍然遇到相同的错误。我很好奇是否有人有任何想法。
我真的很感激任何建议。
非常感谢。
埃里克
I could use some help. I am just getting into Mac development a bit. This is a port from Windows and I am so close to finishing. I am trying to link to ZLib as I have an application that depends on it. I am creating multiple libraries with a fairly simple hierarchy. Anyways, the important thing is, I am getting linker errors when trying to link to ZLib. I have added libz.dylib as a framework and set it to the correct target but my calls to ZLib are getting "Symbol(s) not found" errors. I have tried using the Z_PREFIX flag but no luck. I have set the path of zlib to my library search paths even though I don't think I need it (/usr/lib..but it has an absolute path I think). It shows up in my target as a link binary and its listed at the top of the list which makes me think that link order is not the issue. The only header I link to is zlib.h and I even included that to the same target. However, no matter what I try I still get the same error. I was curious if anyone has any ideas.
I really appreciate any suggestions.
Thanks much.
Erik
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论