• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

libiconv没有链接到iOS项目

用户头像
it1352
帮助1

问题说明

我正在尝试将 MailCore 编译到我正在制作的iOS应用中,并且链接器一直抱怨libiconv不是'我联系在一起。至少我认为这是抱怨的。这是它吐出的内容:

I'm trying to compile MailCore into an iOS app I'm making, and the linker keeps complaining that libiconv isn't linked in. At least that's what I think it's complaining about. This is what it spits out:

Undefined symbols for architecture i386:
  "_iconv", referenced from:
      _mail_iconv in libmailcore.a(charconv.o)
  "_iconv_open", referenced from:
      _charconv in libmailcore.a(charconv.o)
      _charconv_buffer in libmailcore.a(charconv.o)
  "_iconv_close", referenced from:
      _charconv in libmailcore.a(charconv.o)
      _charconv_buffer in libmailcore.a(charconv.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

(这是为为我的iPhone构建同样的错误,但 s / i386 / armv7 / )。

(This is building for the simulator. Building for my iPhone gives the same error, but s/i386/armv7/).

I我已经尝试将 libiconv.dylib 添加到Link Binary with Libraries,但它根本不会改变错误。

I've tried adding libiconv.dylib to "Link Binary with Libraries", but it doesn't change the errors at all.

知道这里有什么不对吗?我一直在尝试谷歌这个错误,但我找不到任何有关如何链接在libiconv的信息。既然它是iOS SDK的一部分,你会认为我不需要自己编译吗?

Any idea what could be wrong here? I've been trying to Google this error, but I can't find any information about how to link in libiconv. Since it's part of the iOS SDK, you would think I shouldn't need to compile it myself?

正确答案

#1

作为额外的确认lib包含在你的目标中,在Xcode左侧窗格的文件列表中选择lib(假设你已经将它添加到你的Target / Project,你应该看到框架下列出的框架),并显示Assistant Editor视图在右侧窗格中(查看 - >助理编辑器 - >显示助理编辑器)。

As extra confirmation that the lib is included in your target, select the lib in the file list in the left pane of Xcode (assuming you've added it to your Target / Project, you should see the framework listed under frameworks), and show the Assistant Editor view on the right pane (View -> Assistant Editor -> Show Assistant Editor).

然后,在左侧选择相关的库,您将看到目标成员资格对于该lib显示为右侧的复选框列表。

Then, with the relevant lib selected on the left, you will see 'Target Membership' for that lib shown as a list of checkboxes on the right.

您应该看到App Target Listed,并且应该检查该目标的复选框。

You should see App Target Listed, and the checkbox should be checked for that target.

您可以尝试取消选中并重新检查它,将其轻推到您的项目中吗?

You could try unchecking and rechecking it, to nudge it into your project?

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfkbaj
系列文章
更多 icon
同类精品
更多 icon
继续加载