6

我不明白为什么会这样。我正在尝试我们的 CMTimeMake:

CMTime cmTime = CMTimeMake(60, 1);

的进口.h是:

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

并且.m是:

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

构建错误为:

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)

我错过了什么?

4

1 回答 1

29

您没有与 CoreMedia 框架链接。您可以在项目编辑器中将其添加到您的目标中,如下所示:

连接框架

于 2014-09-26T20:28:27.053 回答