用于架构 i386 InMobi 的未定义符号



我正在尝试在一个iOS应用程序上实现Admob中介。 当我在构建项目时与InMobi集成时,我收到此错误

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_IMCommonUtil", referenced from:
      objc-class-ref in libAdapterInMobi.a(GADInMobiExtras.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

请帮忙

你没有在你的项目中包括InMobi Commons库(libInMobiCommons)吗?

InMobi iOS AdNetwork Bundle: (http://developer.inmobi.com/wiki/index.php?title=InMobi_SDK_3.6.0_for_iOS#Getting_Started)

IMAdDelegate.h
IMAdError.h
IMAdInterstitial.h
IMAdInterstitialDelegate.h
IMAdRequest.h
IMAdView.h
IMCommonUtil.h
libInMobiAdNetwork-3.6.0.a
libInMobiCommons-3.6.0.a

在库上做一个 lipo -detailed_info 会告诉它为以下 arch 构建 - armv7,armv7(s) 和 i386。架构 i386 中央处理器类型 CPU_TYPE_I386 中央处理器亚型 CPU_SUBTYPE_I386_ALL 偏移量 68 尺寸 275880 对齐 2^2 (4)架构 ARMv7 中央处理器类型 (12) 中央处理器子类型 中央处理器子类型 (9) 偏移275948 尺寸295872 对齐 2^2 (4)体系结构(CPU 类型 (12) CPU 子类型 (11)) 中央处理器类型 (12) 中央处理器子类型 中央处理器子类型 (11) 偏移量 571820 尺寸295792 对齐 2^2 (4)因此,可能只需链接项目中的库,您的错误就会被删除。

据推测,静态库不是多架构"足够"的:它可能只为 iOS 构建(在这种情况下,只有 ARMv7 或 ARMv6 和 ARMv7 架构存在于内部),或者用于 64 位 iPhone 模拟器(在这种情况下,i386 没有内置到库中,只有x86_64处理器类型的代码)。你真的无能为力;在真实设备上测试应用程序(无论如何,几乎总是在设备上测试您的应用程序)。

最新更新