I am planning to incorporate instaPDF and Avairy in my app. I can download and compile instaPDF just fine using Xcode 4.6.

The problem I have is that as part of incorporating Aviary I have to set "Other linker flags" to "-ObjC -all_load". As soon as I set that I get these errors. If I remove other linker flags all is fine. Ofcourse then Aviary does't launch and it crashes.

So two questions

1) What's the point of other linker flags? What is the meaning of setting it to -ObjC -all_load

2) Is there a way I can set other linker flags and still have instaPDF be happy or Does this mean there is no Aviary and InstaPDF can coexist?

Here are the errors.

Undefined symbols for architecture armv7:
  "_CVPixelBufferGetPixelFormatType", referenced from:
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetWidthOfPlane", referenced from:
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetHeightOfPlane", referenced from:
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferLockBaseAddress", referenced from:
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetBaseAddressOfPlane", referenced from:
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetBaseAddress", referenced from:
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetWidth", referenced from:
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetBytesPerRow", referenced from:
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetBytesPerRowOfPlane", referenced from:
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVBufferRetain", referenced from:
      -[CaptureDelegate captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_avfoundation.o)
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
      -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o)
      -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferGetHeight", referenced from:
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVPixelBufferUnlockBaseAddress", referenced from:
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
      -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
  "_CVBufferRelease", referenced from:
      -[CaptureDelegate captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_avfoundation.o)
      -[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有帮助吗?

解决方案

You need to link the CoreVideo framework to resolve all of those symbols.

Here's a simple trick. Look at one of the undefined symbols. Copy the symbol (minus the leading underscore) and enter it into the search field of the reference docs in the Xcode organizer. Select the matching reference. Scroll to the top of the reference page. There should be an entry for Framework in the header at the top of the page.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top