New iOS Dev
New iOS Dev

Reputation: 2057

how to fix Undefined symbols for architecture arm64 error?

I am getting this issue of architecture?

   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)

What I have done

  1. In Build Phase - Link binary with libraries I have added AVKit, CoreGraphics, QuartzCore

2.Build Architecture only - NO

Is there any way to solve this issue?

Upvotes: 2

Views: 2470

Answers (1)

Chanchal Warde
Chanchal Warde

Reputation: 983

1- Add CoreGraphics framework into your project

2- Import CoreGraphics

3- Clean your project

4- Try to Build again

Upvotes: 3

Related Questions