IOS静态库产品一直是红色的

发布于 2024-11-14 09:48:19 字数 152 浏览 2 评论 0原文

我已经为此苦苦挣扎了几天。当我在 XCode 4 中的 IOS 下创建一个新的静态库项目时,我遇到了一个问题。无论是否添加文件作为标头或进行编译,我都能够成功构建,但 .a 文件始终为红色。这种情况在调试和发布中都会发生。我读过类似的问题,但没有找到解决该问题的人。任何帮助将不胜感激。谢谢

I've been struggling with this for a few days now. When I create a new Static Library project under IOS in XCode 4 I am running into an issue. With or without adding files as headers or to be compiled I am able to successfully build but the .a file is always red. This happens in both Debug and Release. I've read about similar issues but haven't found someone who has fixed the problem. Any help would be appreciated. Thanks

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

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

发布评论

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

评论(2

心的憧憬 2024-11-21 09:48:19

XCode 在构建模拟器时似乎在这方面有一个错误。为设备构建一次,右键单击库以在查找器中显示,备份关卡,然后导航到模拟器关卡。你的图书馆就在那里。 (路径将如下所示:/Users/You/Library/Developer/Xcode/DerivedData/LibName-fylbqugtzucxyndtdddrjmbbdnet/Build/Products/Debug-iphonesimulator)

XCode seems to have a bug in this regard when building for the simulator. Build once for device, right-click the library to show in finder, back up a level, and navigate to the simulator one. Your library will be there. (The path will look something like this: /Users/You/Library/Developer/Xcode/DerivedData/LibName-fylbqugtzucxyndtdddrjmbbdnet/Build/Products/Debug-iphonesimulator)

浅浅淡淡 2024-11-21 09:48:19

我无法找出这个问题的答案,但我确实找到了解决方法。我安装了 XCode 4 项目模板来构建通用框架 https://github.com/kstenerud/iOS -通用框架。这使我能够构建一个适合我的需求的框架。

I wasn't able to figure out the answer to this problem but I did find a work around. I installed the XCode 4 project template to build universal frameworks from https://github.com/kstenerud/iOS-Universal-Framework. This allowed me to build a framework which fit my needs.

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