Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture i386: "_CMTimeMake", referenced from:

I don't understand why this is happening. I'm trying to us CMTimeMake:

CMTime cmTime = CMTimeMake(60, 1);

The imports of .h are:

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>

and .m are:

#import "ViewController.h"
#import "ContentView.h"
#import "AppDelegate.h"
#import "BackButton.h"
#import "NavButton.h"
#import "IIViewDeckController.h"
#import "TutorialView.h"

With a build error of:

Undefined symbols for architecture i386:
  "_CMTimeMake", referenced from:
      -[ViewController activateLockScreenPlayer:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What am I missing?

like image 411
Jacksonkr Avatar asked Sep 26 '14 20:09

Jacksonkr


1 Answers

You aren't linking with the CoreMedia framework. You can add it to your target in the project editor, like this:

linking the framework

like image 188
rob mayoff Avatar answered Oct 21 '22 05:10

rob mayoff