0

When I'm try to compile my project I get error. I added all required frameworks - AVFoundation,opencv and many other , but it don't help me.Here is few lines from this error:

     Undefined symbols for architecture i386:

  "_OBJC_CLASS_$_AVCaptureDevice", referenced from:
      objc-class-ref in MACaptureSession.o
  "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from:
      objc-class-ref in MACaptureSession.o
  "_OBJC_CLASS_$_AVCaptureSession", referenced from:
      objc-class-ref in MACaptureSession.o
  "_OBJC_CLASS_$_AVCaptureStillImageOutput", referenced from:
      objc-class-ref in MACaptureSession.o
  "_OBJC_CLASS_$_AVCaptureVideoPreviewLayer", referenced from:
      objc-class-ref in MACaptureSession.o
  "_OBJC_CLASS_$_CABasicAnimation", referenced from:
      objc-class-ref in MAImagePickerFinalViewController.o
  "_OBJC_CLASS_$_CATransition", referenced from:
      objc-class-ref in MAImagePickerControllerAdjustViewController.o
      objc-class-ref in MAImagePickerController.o
  "_OBJC_CLASS_$_MPVolumeView", referenced from:
      objc-class-ref in MAImagePickerController.o
  "_kCATransition", referenced from:
      -[MAImagePickerControllerAdjustViewController confirmedImage] in MAImagePickerControllerAdjustViewController.o
STBY
  • 209
  • 1
  • 2
  • 10
  • Here is frameworks from project: MediaPlayer, AudioToolbox, CoreImage, QuartzCore, ImageIO, CoreMedia, AVFoundation, opencv2, Foundation, CoreGraphics, UIKit – STBY Jun 02 '14 at 08:54
  • Try this, clean -> close xcode -> build.. – Mani Jun 02 '14 at 09:00
  • @Mani situation don't changed – STBY Jun 02 '14 at 09:07
  • Did you try this `Go to framework search paths. Remove everything from there`? Also try this too http://stackoverflow.com/questions/19130744/xcode-5-framework-library-search-path-absolute-address. – Mani Jun 02 '14 at 09:09
  • 1
    Did you try to compile with an iPod or iPhone? It seems that you compile your application with a library which is not supported simulator in the simulator. For example: AVFoundation. Try NSLog(@"%@", [AVCaptureDevice devices]); in simulator, you will see no Device – Duyen-Hoa Jun 02 '14 at 09:15

3 Answers3

2

Just add CoreMedia.framework and with AVFoundation.framework to your project.

Got to.

Project -> target -> Build phases -> Link binary with library -> "+" -> select your frameworks

iPatel
  • 46,010
  • 16
  • 115
  • 137
  • 1
    CoreMedia.framework and AVFoundation.framework are already in project – STBY Jun 02 '14 at 08:53
  • Ok... then add which you did not added CoreMedia.framework","AudioToolbox.framework","CoreGraphics.framework","CoreVideo.framework","AVFoundation.framework","libiconv.dylib" – iPatel Jun 02 '14 at 08:55
  • @STBY - Ok then have added "-ObjC" to other linker flags ? – iPatel Jun 02 '14 at 09:12
1

check wheter the MACaptureSession MAImagePickerFinalViewController MAImagePickerControllerAdjustViewController MAImagePickerController.m have been added in target and check in respective m files,wheter implementation name is correct.

madhu
  • 961
  • 9
  • 21
0

As suggested by Mani add required frameworks. If you have already added these frameworks and still getting error, set Build Active Architecture Only to NO under project 's Build Settings.

kkumpavat
  • 452
  • 2
  • 10