I am trying to implement a sample AVFoundation code found here in an Xcode project: http://developer.apple.com/library/mac/#qa/qa1740/_index.html#//apple_ref/doc/uid/DTS40011007
The only changes I made were to remove the links to autorelease, release and save, because I have automatic reference counting for the project. After successfully resolving these build errors, I now get Undefined characters for the x86_64 architecture. "
I run on Mountain Lion 10.8 and get no errors when importing AVFoundation.h into my header file, but it seems that AV * characters were not found?
The following is the error log, .h and .m. Could someone more knowledgeable help me determine where the problem (s) are?
Log:
Undefined symbols for architecture x86_64: "_AVCaptureSessionPresetMedium", referenced from: -[Recorder screenRecording:] in screenAppDelegate.o "_OBJC_CLASS_$_AVCaptureMovieFileOutput", referenced from: objc-class-ref in screenAppDelegate.o "_OBJC_CLASS_$_AVCaptureScreenInput", referenced from: objc-class-ref in screenAppDelegate.o "_OBJC_CLASS_$_AVCaptureSession", referenced from: objc-class-ref in screenAppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
.h
#import <Cocoa/Cocoa.h> #import <Foundation/Foundation.h> #import <AVFoundation/AVFoundation.h> @interface screenAppDelegate : NSObject <NSApplicationDelegate> @end @interface Recorder : NSObject <AVCaptureFileOutputRecordingDelegate> { @private AVCaptureSession *mSession; AVCaptureMovieFileOutput *mMovieFileOutput; NSTimer *mTimer; } -(void)screenRecording:(NSURL *)destPath; @end
.m
objective-c
Geuis Aug 16 '12 at 22:16 2012-08-16 22:16
source share