当我构建这个代码时,我会得到一个错误,
AVAsset *asset = [AVAsset assetWithURL:ur];
AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc]initWithAsset:asset];
CMTime time = CMTimeMake(2, 1);
CGImageRef imageRef = [imageGenerator copyCGImageAtTime:time actualTime:NULL error:NULL];
UIImage *thumbnail = [UIImage imageWithCGImage:imageRef];
cell.imageView.image=thumbnail;
CGImageRelease(imageRef);误差
Undefined symbols for architecture i386: "_CGImageRelease", referenced from:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)我已经添加了libc++.dylib,但是仍然存在错误。我怎么解决这个问题?
发布于 2013-09-18 09:19:05
添加CoreGraphics框架解决了我的问题。
发布于 2013-09-16 12:12:35
您需要将QuartzCore.framework添加到您的项目中,以便代码链接。这个API是QuartzCore框架在iOS中的一部分。此外,在使用它的地方,请使用#import <QuartzCore/QuartzCore.h>
希望这能帮上忙!
https://stackoverflow.com/questions/18827531
复制相似问题