문제

When I build this code I am getting an error,

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);

Error

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)

I have added libc++.dylib but still error persists. How can I resolve this?

도움이 되었습니까?

해결책 2

Adding CoreGraphics framework resolves my problem.

다른 팁

You need to add QuartzCore.framework to your project so that the code links. This API is part of QuartzCore framework in iOS. Also, where using it, use #import <QuartzCore/QuartzCore.h>

Hope that helps!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top