に親指の画像を読み込もうとしていますCGPDFDocument
。main
クラスで呼び出される関数で次のコードを記述しましたReaderThumbFetch
。
NSURL *thumbURL = [self thumbFileURL];
CGImageRef imageRef = NULL;
CGImageSourceRef loadRef = CGImageSourceCreateWithURL((CFURLRef)thumbURL, NULL);
if (loadRef != NULL) // Load the existing thumb image
{
imageRef = CGImageSourceCreateImageAtIndex(loadRef, 0, NULL); // Load it
CFRelease(loadRef); // Release CGImageSource reference
}
thumbFileURL
関数の実装は次のとおりです。
- (NSURL *)thumbFileURL
{
#ifdef DEBUGX
NSLog(@"%s", __FUNCTION__);
#endif
NSString *cachePath = [ReaderThumbCache thumbCachePathForGUID:request.guid]; // Thumb cache path
NSString *fileName = [NSString stringWithFormat:@"%@.png", request.thumbName]; // Thumb file name
return [NSURL fileURLWithPath:[cachePath stringByAppendingPathComponent:fileName]]; // File URL
}
しかし、実行すると、次のエラーが発生します。
Undefined symbols for architecture i386:
"_CGImageSourceCreateWithURL", referenced from:
-[ReaderThumbFetch main] in ReaderThumbFetch.o