如何在xcode 7 beta中链接到libz和libsqlite? [英] How to link to libz and libsqlite in xcode 7 beta?

查看:81
本文介绍了如何在xcode 7 beta中链接到libz和libsqlite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到链接错误,如:

   +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  "_deflate", referenced from:
      +[MTAWXOHelper GZip:Out:] in libWeChatSDK.a(MTAWXOHelper.o)
  "_deflateEnd", referenced from:
      +[MTAWXOHelper GZip:Out:] in libWeChatSDK.a(MTAWXOHelper.o)
  "_deflateInit2_", referenced from:



<但是我已经将这些库添加到我的目标中了。但目前所有这些图书馆都有不同的扩展名.tbd。

But I've already added those library to my target. But currently all those library have different extension .tbd.

任何想法?谢谢。

推荐答案

在链接tbd文件时,XCode 7中存在一个已知问题。以下是关于如何在XCode 7中链接tbd文件的苹果开发人员论坛答案的链接 - https ://forums.developer.apple.com/message/8609#8609

There is a known issue in XCode 7 while linking tbd files. Here is the link to the apple developer forum answer on how to link tbd files in XCode 7 - https://forums.developer.apple.com/message/8609#8609

[链接的片段可在下面找到]

[Snippet from the link is available below]


这是Xcode 7测试版中的已知问题。

This is a known issue in the Xcode 7 beta.

目前要解决此问题,请:

To work around this issue for now, please:


  • 从链接的库阶段或复制的捆绑资源阶段(有时会复制捆绑资源阶段)删除对.tbd文件的所有引用添加)。

  • 通过为要链接的每个库添加参数:-l,将要手动链接的库手动添加到Other Linker Flags构建设置(例如,添加-lsqlite3(不带引号))。

对于那些好奇的人,.tbd文件是新的text-基于存根库,提供了更紧凑的版本用于SDK的e存根库,有助于显着减少其下载大小。

For those who are curious, the .tbd files are new "text-based stub libraries", that provide a much more compact version of the stub libraries for use in the SDK, and help to significantly reduce its download size.

这篇关于如何在xcode 7 beta中链接到libz和libsqlite?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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