XCode中,如果直接将libyuv.a文件拖进到项目中, 编译的时候有时会出现异常。

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC 
    
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -libyuv
    
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lKeyboardService is not an object file (not allowed in a library)
    

    解决办法是在Build Settings面板下,Library Search Paths中增加多一项,libyuv.a所在的目录,注意设置为相对目录,否则提交后,项目其他同事可能编译不过。