在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
第一步修改,左上角Xcode默认选中的项目类型选的不对,纠正过来
改为如下:
报错:
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)
说找不到libz.dylib这个动态库
现在的动态库已经是.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
设置build setting -> Apple LLVM7.1 - Language - Objective C -> Weak References in Manual Retain Release YES
报错
关掉bitcode,设为NO
报错
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
搞定。可以运行了。