Xcode 6.1静态库.a for iOS未生成 [英] Xcode 6.1 static library .a for iOS not generated

查看:132
本文介绍了Xcode 6.1静态库.a for iOS未生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Xcode 6.1为我的iOS设备创建一个静态库。

I tried to make a static library for my iOS device using Xcode 6.1.

我在Xcode上选择一个带有模板Cocoa Touch Static Library的新项目,并将其命名为MyLib 。
对于MyLib目标,我在模拟器中选择iPhone 6。

I choose on Xcode a new project with template Cocoa Touch Static Library and named it MyLib. For MyLib target I choose iPhone 6 in the Simulator.

项目打开后,我成功构建了MyLib。

After the project was opened, I build MyLib with succeed.

但是,如果我查看Products文件夹,libMyLib.a是红色的,没有任何反应,如果我想用finder显示它。

But if I look to the Products folder, the libMyLib.a is red and nothing happens, if I want show it with finder.

In以前版本的Xcode似乎有用,我在一些教程中找到了。

In prior versions of Xcode it seems to work, how I find in some tutorials.

我找到了解决方案:库是在

I found the solution: the library is created under


../ Xcode / Products / Debug-iphonesimulator / libMyLib.a

../Xcode/Products/Debug-iphonesimulator/libMyLib.a

如果我将目标切换到我真正的iPhone 6,它也可以工作,在产品文件夹中,libMyLib将是黑色的,库是在

If I switch the target to the my real iPhone 6 it works too and in the Products Folder the libMyLib would be black and the library is created under


<下创建的p> ../ Xcode / Products / Debug-iphoneos / libMyLib.a

../Xcode/Products/Debug-iphoneos/libMyLib.a


推荐答案

这也发生在我身上。我相信libMyLib.a已成功构建并位于Debug-iphonesimulator文件夹下,但Xcode无法链接到正确的路径。两种方式你都可以找到它。

This happened to me as well. I believed the libMyLib.a was built successfully and sat under Debug-iphonesimulator folder but Xcode couldn't link to the correct path. Two way you can find it.


  1. 如OP建议的那样,使用iPhone 6构建库。目标库应为黑色,右键单击显示在文件夹中。 Debug-iphonesimulator的库文件夹与Debug-iphoneos相同级别

  1. As OP suggested, build the library with iPhone 6. The target library should be in black and right click show in folder. The library folder for Debug-iphonesimulator is at the same level as Debug-iphoneos

查找构建目标目录。通常,它位于:

Find your build target directory. Typically, it is under:




/ Users / yourName / Library / Developer / Xcode / DerivedData / yourProjectName-wholebunchofalphebets / Build / Products

/Users/yourName/Library/Developer/Xcode/DerivedData/yourProjectName-wholebunchofalphebets/Build/Products

这篇关于Xcode 6.1静态库.a for iOS未生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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