Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/120.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 架构i386的未定义符号:“_CMTimeMake“;,引用自:_Ios_Objective C_Cmtime - Fatal编程技术网

Ios 架构i386的未定义符号:“_CMTimeMake“;,引用自:

Ios 架构i386的未定义符号:“_CMTimeMake“;,引用自:,ios,objective-c,cmtime,Ios,Objective C,Cmtime,我不明白为什么会这样。我想让我们做: CMTime cmTime = CMTimeMake(60, 1); .h的导入为: #import <UIKit/UIKit.h> #import <MediaPlayer/MediaPlayer.h> #import <AVFoundation/AVFoundation.h> #import "ViewController.h" #import "ContentView.h" #import "AppDelegat

我不明白为什么会这样。我想让我们做:

CMTime cmTime = CMTimeMake(60, 1);
.h
的导入为:

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>
#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)

我缺少什么?

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