ios - 如何修复架构arm64错误的 undefined symbol ?

标签 ios xcode8

我遇到了这个架构问题?

   Undefined symbols for architecture arm64:
      "_CGImageGetWidth", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
      "_CGColorSpaceCreateDeviceRGB", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
      "_CGBitmapContextCreate", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
      "_CGImageGetHeight", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
      "_CGColorSpaceRelease", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
      "_CGContextDrawImage", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
      "_CGContextRelease", referenced from:
          GetBytesFromCGImage(CGImage*, int*, int*, int*) in OSInference.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

我做了什么

  1. 在构建阶段 - 将二进制文件与我添加的库链接起来 AVKit、CoreGraphics、QuartzCore

2.仅构建架构 - 否

有什么办法可以解决这个问题吗?

最佳答案

1-CoreGraphics 框架添加到您的项目中

2-导入CoreGraphics

3-清理您的项目

4-尝试再次构建

关于ios - 如何修复架构arm64错误的 undefined symbol ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41826467/

相关文章:

ios - 如何在后台触发多步api交易?

ios - TextField 覆盖在 ScrollView 上 "Adjust to Fit"TextField 不起作用

ios - 命令因信号 : Segmentation fault: 11 while archiving 而失败

ios - 使用旧版 Swift 语言版本”(SWIFT_VERSION)不起作用

java - 转发新 session 时出错找不到: Capabilities [{iPhone=Safari, browserName=Safari, deviceVersion=10.3.1, platformName=iOS}]

ios - 按钮文字不显示

swift - Xcode 8.0 CBCentralManager 问题

ios - Unity转Xcode错误: Apple Mach-O Linker (ld) Error Group

android - Flutter 原生插件 : Example with eventlisteners