Can't archive on Xcode: CocoaPods linking error

岁酱吖の 提交于 2019-12-09 12:11:13

问题


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)

I'm using Xcode 4.6 and iOS 5.0.


回答1:


I searched for a long time and finally got something and solved the same problem for me. For anyone who still needs:

In Build Setting > Other Linker Flag:

Probably the flag is different for Debug and others.
Try to change wherever $(TARGET_BUILD_DIR) to $(BUILT_PRODUCTS_DIR).

For me, I changed $(TARGET_BUILD_DIR)/libPods.a to $(BUILT_PRODUCTS_DIR)/libPods.a, and problem solved.



来源:https://stackoverflow.com/questions/14644122/cant-archive-on-xcode-cocoapods-linking-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!