0

我正在尝试在 Xcode 的 cocos2d 项目中显示 AppLovin sdk,但我目前无法调试此 Apple Mach-O 错误,如下所述。

Undefined symbols for architecture i386:
  "_CMTimeGetSeconds", referenced from:
      -[ALVideoViewController timeLeft] in libAppLovinSdk.a(ALVideoViewController.o)
      -[ALVideoViewController percentViewed] in libAppLovinSdk.a(ALVideoViewController.o)
  "_CMTimeMakeWithSeconds", referenced from:
      -[ALVideoViewController createCountdownTimeObserver] in libAppLovinSdk.a(ALVideoViewController.o)
  "_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
      ___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
  "_MPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from:
      ___53-[ALInterstitialViewController moviePlayerDidFinish:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
  "_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from:
      ___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o)
  "_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
      objc-class-ref in libAppLovinSdk.a(ALInterstitialViewController.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我去构建阶段 -> 添加其他 -> 从显示的查找器中选择 libAppLovinSdk.a 文件。

我还将 Build Active Architectures 的值设置为 NO 并从架构中删除了 arm64。没有 i386 架构。

4

1 回答 1

4

您缺少CoreMediaandMediaPlayer框架。

(我通过谷歌搜索发现了这一点,CMTimeGetSecondsMPMoviePlayerPlaybackDidFinishNotification查看了 Apple 文档的哪个部分得到了点击,但是CMandMP前缀应该足以告诉你)。

于 2014-10-27T10:04:24.217 回答