问题描述
在iOS项目上,当我编译我的项目以运行它时,它可以正常工作。
但是,如果我对其进行存档,它将失败并显示以下错误:
On an iOS project, when I compile my project to run it, it works fine.
But if I archive it, it fails with the following error:
ld: file not found: /Users/xxxxx/Work/xxxxx/codes/xxxxx/DerivedData/xxxxx/Build/Intermediates/ArchiveIntermediates/xxxxx/InstallationBuildProductsLocation/Applications/libPods.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我正在使用Xcode 4.6和iOS 5.0。
I'm using Xcode 4.6 and iOS 5.0.
推荐答案
我搜索了很长时间,终于得到了一些东西为我解决了同样的问题对于仍然需要的人:
I searched for a long time and finally got something and solved the same problem for me. For anyone who still needs:
在构建设置> 其他链接器标记:
调试和其他标志可能不同。
尝试将 $(TARGET_BUILD_DIR)
更改为 $(BUILT_PRODUCTS_DIR)
。
Probably the flag is different for Debug and others.
Try to change wherever $(TARGET_BUILD_DIR)
to $(BUILT_PRODUCTS_DIR)
.
对我来说,我更改了 $(TARGET_BUILD_DIR)/libPods.a
到 $(BUILT_PRODUCTS_DIR)/libPods.a
,问题已解决。
For me, I changed $(TARGET_BUILD_DIR)/libPods.a
to $(BUILT_PRODUCTS_DIR)/libPods.a
, and problem solved.
这篇关于无法在Xcode上存档:CocoaPods链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!