iOS;使用 ZXing 2.0,使用 Xcode 4.2 链接到 libZXingWidget.a 时遇到问题
我正在尝试将 ZXing 干净地链接到我的 iOS 项目中。这就是我所做的...
- 创建一个空的工作区。
- 在工作区中,文件>工作区设置>派生数据位置:工作空间相关
- 将我自己的项目添加到其中。
- 添加了ZXingWidget项目。这本身就可以干净地构建。
- 根据 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...
- Create an empty workspace.
- In the workspace, file > workspace settings > derived data location: Workspace-relative
- Added my own project into it.
- Added the ZXingWidget project. This in itself builds cleanly.
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过构建阶段添加它是正确的。它会显示为红色,直到它被构建为依赖项目,一旦您在顶级项目上进行构建,它就会执行此操作。
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.