美文网首页bugs
老代码中的坑

老代码中的坑

作者: WSGNSLog | 来源:发表于2017-04-01 17:03 被阅读785次

    在github上下了一个几年前前的老demo,不能运行,几番修改后可以跑起来了,记录一下。。

    /Users/ITtest1/Library/Developer/Xcode/DerivedData/VideoBeautify-aamdiainrolfsqguihgohfpxjurh/Build/Intermediates/GPUImage.build/Debug-iphoneos/Documentation.build/Script-BC552B3A1558C6FC001F3FFA.sh: line 5: /usr/local/bin/appledoc: No such file or directory
    
    1.png

    第一步修改,左上角Xcode默认选中的项目类型选的不对,纠正过来

    2.png

    改为如下:


    3.png

    报错:

    error:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/lib/libz.dylib (No such file or directory)
    
    4.png

    说找不到libz.dylib这个动态库

    5.png

    现在的动态库已经是.tbd了,直接删了工程里的libz.dylib

    报错:

      /Users/ITtest1/Downloads/VideoBeautify-master-3/VideoBeautify/VideoBeautify/ProgressBar/MMProgressHUD.m:346:24: Cannot create __weak reference in file using manual reference counting
    
    6.png

    设置build setting -> Apple LLVM7.1 - Language - Objective C -> Weak References in Manual Retain Release YES

    7.png 8.png

    报错


    9.png

    关掉bitcode,设为NO

    10.png

    报错

    Undefined symbols for architecture arm64:
      "_inflate", referenced from:
      -[ASIDataDecompressor uncompressBytes:length:error:] in libYoukuUploader.a(ASIDataDecompressor.o)
       "_deflate", referenced from:
      -[ASIDataCompressor compressBytes:length:error:shouldFinish:] in libYoukuUploader.a(ASIDataCompressor.o)
      "_deflateEnd", referenced from:
      -[ASIDataCompressor closeStream] in libYoukuUploader.a(ASIDataCompressor.o)
      "_inflateInit2_", referenced from:
      -[ASIDataDecompressor setupStream] in libYoukuUploader.a(ASIDataDecompressor.o)
      "_inflateEnd", referenced from:
      -[ASIDataDecompressor closeStream] in libYoukuUploader.a(ASIDataDecompressor.o)
      "_crc32", referenced from:
      _crcFromData in libYoukuUploader.a(YoukuUploader.o)
      "_deflateInit2_", referenced from:
      -[ASIDataCompressor setupStream] in libYoukuUploader.a(ASIDataCompressor.o)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    添加libz.tbd

    搞定。可以运行了。

    相关文章

      网友评论

        本文标题:老代码中的坑

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