是我姿势不对嘛? 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
依然不行,谷歌无果,求指点方向
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.