ios Undefined symbols for architecture x86_64: "XXX", "_OBJC_CLASS_$_", referenced fr

iOS出现错误。


Undefined symbols for architecture x86_64:

  "_IJKMPMediaPlaybackIsPreparedToPlayDidChangeNotification", referenced from:

      -[IJKMoviePlayerSvodViewController installMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerSvodViewController removeMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerPplayViewController installMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerPplayViewController removeMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerUplayViewController installMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

      -[IJKMoviePlayerUplayViewController removeMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

  "_IJKMPMoviePlayerLoadStateDidChangeNotification", referenced from:

      -[IJKMoviePlayerSvodViewController installMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerSvodViewController removeMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerPplayViewController installMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerPplayViewController removeMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerUplayViewController installMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

      -[IJKMoviePlayerUplayViewController removeMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

  "_IJKMPMoviePlayerPlaybackDidFinishNotification", referenced from:

      -[IJKMoviePlayerSvodViewController installMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerSvodViewController removeMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerPplayViewController installMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerPplayViewController removeMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerUplayViewController installMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

      -[IJKMoviePlayerUplayViewController removeMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

  "_IJKMPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from:

      -[IJKMoviePlayerSvodViewController moviePlayBackDidFinish:] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerPplayViewController moviePlayBackDidFinish:] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerUplayViewController moviePlayBackDidFinish:] in IJKMoviePlayerUplayViewController.o

  "_IJKMPMoviePlayerPlaybackStateDidChangeNotification", referenced from:

      -[IJKMoviePlayerSvodViewController installMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerSvodViewController removeMovieNotificationObservers] in IJKMoviePlayerSvodViewController.o

      -[IJKMoviePlayerPplayViewController installMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerPplayViewController removeMovieNotificationObservers] in IJKMoviePlayerPplayViewController.o

      -[IJKMoviePlayerUplayViewController installMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

      -[IJKMoviePlayerUplayViewController removeMovieNotificationObservers] in IJKMoviePlayerUplayViewController.o

  "_OBJC_CLASS_$_IJKFFMoviePlayerController", referenced from:

      objc-class-ref in IJKMoviePlayerSvodViewController.o

      objc-class-ref in IJKMoviePlayerPplayViewController.o

      objc-class-ref in IJKMoviePlayerUplayViewController.o

  "_OBJC_CLASS_$_IJKFFOptions", referenced from:

      objc-class-ref in IJKMoviePlayerSvodViewController.o

      objc-class-ref in IJKMoviePlayerPplayViewController.o

      objc-class-ref in IJKMoviePlayerUplayViewController.o

  "_OBJC_CLASS_$_LiveVideoCoreSDK", referenced from:

      objc-class-ref in LiveShowViewController.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)



解决方法


这个错误的发生原因一般是“XXX”这个文件(类库)虽然引入了工程中,但是由于种种原因(常见于多人开发,svn同步不规范)导致“XXX”并未被添加到project.pbxproj这个文件中。

解决方法是点击工程,

1.看这个是不是第三方库中的类

在  target ->  Build Phases -> Link Binary With Libraries   中添加,类所在的第三方库。


2如果是自己项目中的类

在targets界面中找到Build Phases,根据提示信息“XXX”来判断缺少什么文件,一般如果缺少自定义的文件,XXX会是缺少的类名,那么就在Complie Sources中加入该文件。如果缺少类库,

则在Link Binary With Libraries中加入该类库。



如果这样还不行,估计是这个第三方库不支持  模拟器,或,真机的架构,之类的问题,反正;就是link方面没有这个类的原因




你可能感兴趣的:(ios Undefined symbols for architecture x86_64: "XXX", "_OBJC_CLASS_$_", referenced fr)