是我姿势不对嘛? 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
依然不行,谷歌无果,求指点方向
1
swizard 2016-11-21 20:42:02 +08:00
提 issue
我直接编译成功运行 xcode 8 而且需要开发者账号 |
2
simon7 2016-11-21 22:40:10 +08:00 via iPhone
Pod repo update
|
3
simon7 2016-11-21 22:40:21 +08:00 via iPhone
Pod install
|
4
jessefang 2016-11-22 09:35:12 +08:00
|
5
wohenyingyu02 OP @jessefang 谢谢,但是我的 cocoapods 已经是最新了
|
6
wohenyingyu02 OP @swizard xcode7 开始不是不用开发者账号么,登陆自己的 Apple ID 就行了?我一直有开发者账号所以不太清楚。
|
7
wohenyingyu02 OP |
8
celent 2016-12-02 00:22:33 +08:00 via iPhone
您好 请问是怎么解决的 遇到同样的问题
|
9
wohenyingyu02 OP @celent pod 设置问题, pod 的库 build 在了 /Dash/build/xxx...里面而 Link 的路径却是 /Dash/Dash/build/xxx...,最简单方法是点击运行再把编译好的库复制过去再运行即可。
|
10
celent 2016-12-02 07:27:30 +08:00 via iPhone
非常感谢
|
11
gaofengwh 2016-12-04 15:34:18 +08:00
你好,我也遇到这个问题了,没理解明白试了几次没成功,能详细讲一下吗?
|
12
wohenyingyu02 OP @gaofengwh 先运行一次,看到这个错误的时候,把 /Dash/build/Debug-iphoneos 里的 13 个文件复制到 /Dash/Dash/build/Debug-iphoneos 里,再点击运行。
|
13
gaofengwh 2016-12-07 00:17:26 +08:00
弄好了,谢谢你
|