bug记录

作者: iHope_Aaron | 来源:发表于2016-06-30 17:19 被阅读11次

    1.使用xcodebuild命令编译工程时,提示某些第三方库文件not found


    错误日志

    xcodebuild -target Guide -configuration Release

    描述:这个问题很奇怪,只要编译成功过一次,上述命令就可以通过!
    编译通过的方法如下:

    • Converted build to use an Xcode workspace & scheme (instead of project & target)
    • Rearranged workspace to have the App project and static library as siblings (not as parent/child)
    • Changed Xcode and workspace settings to use build locations specified in targets
    • Change Build Products Path for App and Library to use ../build (both project files are contained in sibling subfolders of a master directory, so having them build into the same folder solved the original linker/Ld command problem, I think)
    • Edited the App scheme to explicitly build the Library target, and build it before the App target
    • In the Build Phases for the App target, explicitly add the Library under "Link Binary With Libraries"
    • Change the location type of the Library's .a file reference to "Relative to Build Products"
    • Added a "Copy Headers" build phase to the Library project, added the appropriate headers to the Public section
    • Changed the Public Headers Folder Path of the Library project to "/include"
    • Changed the Installation Directory of the Library to $(BUILT_PRODUCTS_DIR)
    • Changed the Library Search Paths and the User Header Search Paths of the App target to $(BUILT_PRODUCTS_DIR)
      (recursive)
    • Added a Clean command before the build on my Jenkins build server
    • Added explicit SDK and Arch arguments to the build command
    • Removed spaces from build configuration name

    最终的命令形式:

    xcodebuild -workspace ClientName.xcworkspace -scheme AppName -configuration "ProdAdHoc" -sdk iphoneos -arch "armv6 armv7"
    

    参考链接:
    [http://stackoverflow.com/questions/6653188/xcode-4-build-succeeds-command-line-build-fails?rq=1]

    相关文章

      网友评论

          本文标题:bug记录

          本文链接:https://www.haomeiwen.com/subject/fjcfjttx.html