带有静态库项目的 Xcode4 Workspace &申请项目 [英] Xcode4 Workspace with Static library project & application project

查看:28
本文介绍了带有静态库项目的 Xcode4 Workspace &申请项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个项目,我将最终拥有一个可供多个应用程序使用的代码库.在阅读文档时,听起来像是创建一个 XCode4 工作区和 2 个项目(1 个库和 1 个应用程序)是要走的路.

I'm working on a project where I'm going to eventually have a library of code that will be used by multiple applications. In reading though the documentation it sounded like creating an XCode4 workspace and 2 projects (1 library, and 1 application) was the way to go.

我这样做了,一切似乎都很好.然而,今天我在我的库项目上做了很多工作,当我运行我的应用程序来测试我的库更改时,它似乎总是包含一个较旧的编译版本.我不知所措,我在我的应用程序方案中添加了我的库作为构建目标,XCode 告诉我它正在编译库,但它总是链接到旧版本.

I did this and everything appeared to be working just great. However, today I did a bunch of work on my library project and when I run my application to test my library changes it appears to always be including an older compiled version. I'm at a loss, I added my library as a build target in my applications scheme and XCode tells me it's compiling the library, but its always linking to an old version.

非常感谢任何帮助.我是否在设置工作区时遗漏了什么?是否有构建步骤会强制链接到我新编译的 .a?我什至尝试删除依赖项、清理、重新添加依赖项并构建我的应用程序,但我仍然得到相同的结果.

Any help is greatly appreciated. Am I missing something in how I set my workspace up? Is there a build step that will force linking to my newly compiled .a? I've even tried removing the dependency, cleaning, re-adding the dependency and building my app and I still get the same results.

推荐答案

事实证明 XCode 做的一切都是正确的,而我不是.另一个清理所有并重新编译,一切都按预期工作.

Turns out XCode was doing everything right, and I wasn't. Another clean all and recompile and everything is working as expected.

这篇关于带有静态库项目的 Xcode4 Workspace &申请项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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