0

我计划在我的应用程序中加入 instaPDF 和 Avairy。我可以使用 Xcode 4.6 下载和编译 instaPDF。

我遇到的问题是,作为合并 Aviary 的一部分,我必须将“其他链接器标志”设置为“-ObjC -all_load”。一旦我设置了这些错误。如果我删除其他链接器标志一切都很好。当然,然后 Aviary 不会启动并且会崩溃。

所以两个问题

1)其他链接器标志有什么意义?设置为-ObjC -all_load是什么意思

2) 有没有办法我可以设置其他链接器标志并且仍然让 instaPDF 感到高兴,或者这是否意味着没有 Aviary 和 InstaPDF 可以共存?

这是错误。

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)
4

1 回答 1

4

您需要链接 CoreVideo 框架来解析所有这些符号。

这是一个简单的技巧。查看未定义的符号之一。复制符号(减去前导下划线)并将其输入到 Xcode 管理器中参考文档的搜索字段中。选择匹配的参考。滚动到参考页面的顶部。页面顶部的标题中应该有一个框架条目。

于 2013-04-25T21:28:51.630 回答