本文介绍了构建静态库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个 .A 静态库为我​​的iPhone项目。

I am trying to build a .a static library for my iPhone project.

所以,我创建了一个新的项目,我使用的模板可可触摸静态库

So, I have created a new project, and I used the template Cocoa Touch Static Library.

然后,在 X code 4.0 ,添加我的 .M .H 文件。

Then, in XCode 4.0, I add my .m and .h files.

我已经成功构建项目,但没有 .A 文件被创建在 X code ,我看到的。一个文件中的产品类别,但以红色显示;因此不存在

i have successfully build the project, but no .a file is created In XCode, I see .a file in Products category but displayed in red; so it doesn't exist.

我不明白为什么我的生成按钮不创建 .A 文件,任何帮助?

I don't understand why my build button don't create .a file, any help?

推荐答案

我看到你接受的答案,但我想我会留下一张纸条为今后库开发人员。升级一个X code 3.x的基于静态库项目到4.x后,图书馆会不会随时升级,并开始做通用库的构建。发生这种情况时,该项目建设将取得成功,并针对目标的依赖关联的应用将会运行得很好,但你会得到红色静态库文件在你拉在项目展示,这是很烦人的,我已经找到了唯一的解决方法是重建项目文件 - 我试图审计构建设置,但无法弄清楚混杂因素

I see that you accepted the answer, but I thought I'd leave a note for future library developers. After upgrading an Xcode 3.x based static library project to 4.x, the library will not always upgrade and begin doing universal library builds. When this happens, the project build will be successful and apps linked against the target dependency will run fine, but you'll get red static library files showing in the projects you pull in. This is very annoying and the only fix I have found is to recreate the project files -- I tried auditing the build settings but was unable to figure out the confounding factors.

希望这有助于节省的人的2个小时里,我只是失去了:-P

Hope this helps save somebody the 2 hours I just lost :-P

这篇关于构建静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 07:41