如何修复apple mach-o链接器错误“架构i386的未定义符号”?

时间:2015-02-03 16:52:26

标签: ios objective-c unity3d ld

当我运行程序时,我收到以下错误:

Undefined symbols for architecture i386:
    "QCARUnityPlayer::getInstance()", referenced from:
      -[DisplayConnection recreateSurface:] in DisplayManager.o
      -[UnityView layoutSubviews] in UnityView.o
      -[UnityAppController applicationDidBecomeActive:] in UnityAppController.o
      -[UnityAppController applicationWillResignActive:] in UnityAppController.o
      -[UnityAppController applicationWillTerminate:] in UnityAppController.o
    "QCARUnityPlayer::QCARNotifyCreated(int, int)", referenced from:
          -[DisplayConnection recreateSurface:] in DisplayManager.o
     "QCARUnityPlayer::QCARSetOrientation(int)", referenced from:
          -[UnityView layoutSubviews] in UnityView.o
          -[UnityAppController applicationDidBecomeActive:] in UnityAppController.o
      "QCARUnityPlayer::destroy()", referenced from:
          -[UnityAppController applicationWillTerminate:] in UnityAppController.o
  "QCARUnityPlayer::QCARInit(char const*)", referenced from:
      -[UnityAppController applicationDidBecomeActive:] in UnityAppController.o
  "QCARUnityPlayer::QCARPause(bool)", referenced from:
      -[UnityAppController applicationWillResignActive:] in UnityAppController.o

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:-1)

此错误通常是由于某些文件无法读取而引起的。