iOS;使用 ZXing 2.0,使用 Xcode 4.2 链接到 libZXingWidget.a 时遇到问题

发布于 2025-01-03 01:34:32 字数 475 浏览 4 评论 0原文

我正在尝试将 ZXing 干净地链接到我的 iOS 项目中。这就是我所做的...

  1. 创建一个空的工作区。
  2. 在工作区中,文件>工作区设置>派生数据位置:工作空间相关
  3. 将我自己的项目添加到其中。
  4. 添加了ZXingWidget项目。这本身就可以干净地构建。
  5. 根据 README,添加了标头搜索路径和 AVFoundation 等库。

所以现在我进入“构建阶段”>将二进制文件与库链接> +>工作区> libZXingWidget.a。 它允许我这样做,但生成的 .a 显示为红色。你知道什么会导致这种情况吗?

不过,我可以“添加其他”... DerivedData ... 指向 libZXingWidget.a。手工。这感觉是错误的,并且可能不适用于所有方案。另外,当我尝试将 ZXingWidget 设置为目标依赖项时,什么也没有显示。知道可能出什么问题吗?

I'm trying to cleanly link ZXing into my iOS project. This is what I did...

  1. Create an empty workspace.
  2. In the workspace, file > workspace settings > derived data location: Workspace-relative
  3. Added my own project into it.
  4. Added the ZXingWidget project. This in itself builds cleanly.
  5. Per the README, added header search paths, and libraries such as AVFoundation.

So now I go to Build Phases > Link Binary with Libraries > + > Workspace > libZXingWidget.a.
It lets me do this, but the resulting .a appears red. Do you know what would cause this?

I can however 'add other' ... DerivedData ... point to libZXingWidget.a. by hand. This feels wrong and may not work in all schemes. Also when I try setting ZXingWidget as a target dependency, nothing shows up. Any idea what could be wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泛滥成性 2025-01-10 01:34:32

通过构建阶段添加它是正确的。它会显示为红色,直到它被构建为依赖项目,一旦您在顶级项目上进行构建,它就会执行此操作。

Adding it via the Build Phases is right. It'll appear red until it gets built as a dependent project, which it will do as soon as you do a build on the top level project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文