V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wohenyingyu02
V2EX  ›  程序员

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

  •  
  •   wohenyingyu02 · 2016-11-21 15:40:07 +08:00 · 2516 次点击
    这是一个创建于 2909 天前的主题,其中的信息可能已经有所发展或是发生改变。

    是我姿势不对嘛? 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

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

    13 条回复    2016-12-07 00:17:26 +08:00
    swizard
        1
    swizard  
       2016-11-21 20:42:02 +08:00
    提 issue

    我直接编译成功运行 xcode 8 而且需要开发者账号
    simon7
        2
    simon7  
       2016-11-21 22:40:10 +08:00 via iPhone
    Pod repo update
    simon7
        3
    simon7  
       2016-11-21 22:40:21 +08:00 via iPhone
    Pod install
    jessefang
        4
    jessefang  
       2016-11-22 09:35:12 +08:00
    wohenyingyu02
        5
    wohenyingyu02  
    OP
       2016-11-22 09:38:37 +08:00
    @jessefang 谢谢,但是我的 cocoapods 已经是最新了
    wohenyingyu02
        6
    wohenyingyu02  
    OP
       2016-11-22 09:40:17 +08:00
    @swizard xcode7 开始不是不用开发者账号么,登陆自己的 Apple ID 就行了?我一直有开发者账号所以不太清楚。
    wohenyingyu02
        7
    wohenyingyu02  
    OP
       2016-11-22 16:30:23 +08:00
    已解决,多谢各位
    @swizard
    @simon7
    @jessefang
    celent
        8
    celent  
       2016-12-02 00:22:33 +08:00 via iPhone
    您好 请问是怎么解决的 遇到同样的问题
    wohenyingyu02
        9
    wohenyingyu02  
    OP
       2016-12-02 01:40:01 +08:00 via iPhone
    @celent pod 设置问题, pod 的库 build 在了 /Dash/build/xxx...里面而 Link 的路径却是 /Dash/Dash/build/xxx...,最简单方法是点击运行再把编译好的库复制过去再运行即可。
    celent
        10
    celent  
       2016-12-02 07:27:30 +08:00 via iPhone
    非常感谢
    gaofengwh
        11
    gaofengwh  
       2016-12-04 15:34:18 +08:00
    你好,我也遇到这个问题了,没理解明白试了几次没成功,能详细讲一下吗?
    wohenyingyu02
        12
    wohenyingyu02  
    OP
       2016-12-05 11:22:33 +08:00
    @gaofengwh 先运行一次,看到这个错误的时候,把 /Dash/build/Debug-iphoneos 里的 13 个文件复制到 /Dash/Dash/build/Debug-iphoneos 里,再点击运行。
    gaofengwh
        13
    gaofengwh  
       2016-12-07 00:17:26 +08:00
    弄好了,谢谢你
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4720 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:53 · PVG 17:53 · LAX 01:53 · JFK 04:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.