Dash for iOS 编译不出来,求指点

2016-11-21 15:40:07 +08:00
 wohenyingyu02

是我姿势不对嘛? https://github.com/Kapeli/Dash-iOS 按照 readme 编译,连接报错:

ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/AutoCoding' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/DTBonjour' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/DZNEmptyDataSet' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/GZIP' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/JGMethodSwizzler' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/KissXML' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/MRProgress' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/NSTimer-Blocks' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/Reachability' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/SAMKeychain' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/UIActionSheet+Blocks' ld: warning: directory not found for option '-L/Users/Steven/GitProjects/Dash/Dash/build/Debug-iphoneos/UIAlertView+Blocks' ld: library not found for -lAutoCoding clang: error: linker command failed with exit code 1 (use -v to see invocation)

很明显是 Cocoapods 的问题,因为找不到的这些东西全是 pod 里包含的库,于是按照 pod 官方的 troubleshooting 尝试了:

If Xcode complains when linking, e.g. Library not found for -lPods, it doesn't detect the implicit dependencies:

Go to Product > Edit Scheme Click on Build Add the Pods static library, and make sure it's at the top of the list Clean and build again If that doesn't work, verify that the source for the spec you are trying to include has been pulled from GitHub. Do this by looking in <project dir="">/Pods/<name of="" spec="" you="" are="" trying="" to="" include="">. If it is empty (it should not be), verify that the ~/.cocoapods/master/<spec>/<spec>.podspec has the correct git hub url in it. If still doesn't work, check your Xcode build locations settings. Go to Preferences -> Locations -> Derived Data -> Advanced and set build location to "Relative to Workspace".

依然不行,继续尝试了: pod install pod update

依然不行,谷歌无果,求指点方向

2387 次点击
所在节点    程序员
13 条回复
swizard
2016-11-21 20:42:02 +08:00
提 issue

我直接编译成功运行 xcode 8 而且需要开发者账号
simon7
2016-11-21 22:40:10 +08:00
Pod repo update
simon7
2016-11-21 22:40:21 +08:00
Pod install
jessefang
2016-11-22 09:35:12 +08:00
wohenyingyu02
2016-11-22 09:38:37 +08:00
@jessefang 谢谢,但是我的 cocoapods 已经是最新了
wohenyingyu02
2016-11-22 09:40:17 +08:00
@swizard xcode7 开始不是不用开发者账号么,登陆自己的 Apple ID 就行了?我一直有开发者账号所以不太清楚。
wohenyingyu02
2016-11-22 16:30:23 +08:00
已解决,多谢各位
@swizard
@simon7
@jessefang
celent
2016-12-02 00:22:33 +08:00
您好 请问是怎么解决的 遇到同样的问题
wohenyingyu02
2016-12-02 01:40:01 +08:00
@celent pod 设置问题, pod 的库 build 在了 /Dash/build/xxx...里面而 Link 的路径却是 /Dash/Dash/build/xxx...,最简单方法是点击运行再把编译好的库复制过去再运行即可。
celent
2016-12-02 07:27:30 +08:00
非常感谢
gaofengwh
2016-12-04 15:34:18 +08:00
你好,我也遇到这个问题了,没理解明白试了几次没成功,能详细讲一下吗?
wohenyingyu02
2016-12-05 11:22:33 +08:00
@gaofengwh 先运行一次,看到这个错误的时候,把 /Dash/build/Debug-iphoneos 里的 13 个文件复制到 /Dash/Dash/build/Debug-iphoneos 里,再点击运行。
gaofengwh
2016-12-07 00:17:26 +08:00
弄好了,谢谢你

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/322109

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX