iphone - 与 _CGImageSourceCreateWithData 相关的链接错误

标签 iphone objective-c ios xcode

编译时出现错误。

Undefined symbols for architecture armv6:
"_CGImageSourceCreateWithData", referenced from:
  ___-[AVCamCaptureManager captureStillImage]_block_invoke_1 in AVCamCaptureManager.o
"_CGImageSourceCopyPropertiesAtIndex", referenced from:
  ___-[AVCamCaptureManager captureStillImage]_block_invoke_1 in AVCamCaptureManager.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

它看起来像是一个缺失的库,但我包括了我认为我需要的那些,例如

核心图形, quartz 芯 基础.框架

我还在标题中添加了

#import <MobileCoreServices/UTCoreTypes.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import <ImageIO/CGImageProperties.h>
#import <ImageIO/ImageIO.h>
#import <CoreFoundation/CoreFoundation.h>
#import <QuartzCore/QuartzCore.h>
#import <AVFoundation/AVFoundation.h>

我已经追了 40 分钟了,伙计们,我错过了什么?

非常感谢, -代码

最佳答案

对于 CGImageSourceCreateWithData

添加ImageIO.framework,

但从您的#import 指令的外观来看,我认为您还需要至少添加: AVFoundation 和 MobileCoreServices

关于iphone - 与 _CGImageSourceCreateWithData 相关的链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8338762/

相关文章:

ios - 了解通用链接委托(delegate)方法及其在 iOS 中的用途

iphone - 崩溃的原因..?

ios - Apple 开发者注册错误 : Your enrollment in the Apple Developer Program could not be completed at this time

html - 如何在 UIWebView 中显示本地 html 文件?

iPhone 用户界面选择器

.net - Objective-C UUID 是否与 .NET 兼容

ios - -[UIImage _imageByUnpremultiplying] : unrecognized selector sent to instance

ios - 如何从通知响应中重新加载 iOS 14 WidgetKit 的时间线?

iphone - 如何在隐藏控件时仅捕获 MPMoviePlayerController View 上的单击/点击?

ios - XCode 错误 'YogaKit.modulemap' 未找到