0

I am using AFNetworking and 2 more frameworks using cocoapods in my project, and now I want to add opencv2.framework in the same project

Is there any different technique of doing this? Because when I add opencv2.framework in my project (already using cocoapods) it is showing errors:

Undefined symbols for architecture armv7: "_CMTimeMake", referenced from: -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o) "_AVCaptureSessionPresetLow", referenced from: -[CvAbstractCamera createCaptureSession] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_AVCaptureSessionPresetHigh", referenced from: -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_AVCaptureSessionPreset352x288", referenced from: -[CvAbstractCamera init] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_AVLayerVideoGravityResizeAspectFill", referenced from: -[CvAbstractCamera createVideoPreviewLayer] in opencv2(cap_ios_abstract_camera.o) "_AVVideoCodecKey", referenced from: -[CvPhotoCamera createStillImageOutput] in opencv2(cap_ios_photo_camera.o) -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_AVAssetReaderTrackOutput", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) "_AVMediaTypeVideo", referenced from: -[CvAbstractCamera createCaptureDevice] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera setDesiredCameraPosition:] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera lockFocus] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera unlockFocus] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera lockExposure] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera unlockExposure] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera lockBalance] in opencv2(cap_ios_abstract_camera.o) ... "_AVCaptureSessionPresetMedium", referenced from: -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_AVVideoHeightKey", referenced from: -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_AVVideoCodecH264", referenced from: -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_AVAssetWriterInputPixelBufferAdaptor", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_video_camera.o) "_AVVideoCodecJPEG", referenced from: -[CvPhotoCamera createStillImageOutput] in opencv2(cap_ios_photo_camera.o) "_AVVideoWidthKey", referenced from: -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from: type metadata accessor for __ObjC.AFNetworkReachabilityManager in Config.o "_OBJC_CLASS_$_AVAssetWriter", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_AVCaptureStillImageOutput", referenced from: objc-class-ref in opencv2(cap_ios_photo_camera.o) "_AVCaptureSessionPreset640x480", referenced from: -[CvAbstractCamera initWithParentView:] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AVAssetReader", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) "_AVCaptureSessionPreset1280x720", referenced from: -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AVCaptureVideoPreviewLayer", referenced from: objc-class-ref in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AVURLAsset", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) "_CMSampleBufferGetImageBuffer", referenced from: -[CaptureDelegate captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_avfoundation.o) -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_AVCaptureVideoDataOutput", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_video_camera.o) "_AVFileTypeMPEG4", referenced from: -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AVCaptureDevice", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from: l__CATEGORY_AFHTTPRequestOperationManager_$_ in Constants.o type metadata accessor for __ObjC.AFHTTPRequestOperationManager in Constants.o "_CMSampleBufferGetPresentationTimeStamp", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_OBJC_CLASS_$_CLImageEditor", referenced from: type metadata accessor for __ObjC.CLImageEditor in MultiImagePickerViewController.o "_AVCaptureSessionPresetPhoto", referenced from: -[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AVCaptureSession", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_abstract_camera.o) "_OBJC_CLASS_$_AFHTTPResponseSerializer", referenced from: type metadata accessor for __ObjC.AFHTTPResponseSerializer in Config.o "_OBJC_CLASS_$_AVAssetWriterInput", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) objc-class-ref in opencv2(cap_ios_video_camera.o) "_AFStringFromNetworkReachabilityStatus", referenced from: static .Config.(reachability (.Config.Type) -> ((status : Swift.String, connected : Swift.Bool) -> ()) -> ()).(closure #1) in Config.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

But when I am using opencv2.framework in new project without cocoapods it is working fine

1 Answer 1

3

Link your project against CoreMedia framework. And it seems like AVFoundation has to be added too

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.