架构i386 / armv7的未定义符号[cocoapods]

时间:2014-11-26 08:18:00

标签: ios objective-c cocoapods armv7 i386

使用$ pod install命令安装自定义窗格后,我无法构建项目,因为有一些错误如下(在我的Xcode上,错误是关于 armv7 ,在另一个Xcode,错误是关于 i386架构):

Undefined symbols for architecture armv7:
  "_generateCombMatrix", referenced from:
      -[className method:] in libPods-Bot-betting-core.a(ClassName)
  "_debugLog", referenced from:
  -[ClassName Method:] in libPods-Bot-betting-core.a(className.o)
  -[ClassName method] in libPods-Bot-betting-core.a(className.o)
  -[className method] in libPods-Bot-betting-core.a(className.o)
  -[className method:] in libPods-Bot-betting-core.a(className.o)
  -[className method:] in libPods-Bot-betting-core.a(className.o)
  -[className method] in libPods-Bot-betting-core.a(className.o)
  -[className method] in libPods-Bot-betting-core.a(className.o)
  -[className method] in libPods-Bot-betting-core.a(className.o)
  ...
  "_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO", referenced from:
  -[className init] in libPods-Bot-betting-core.a(className.o)

错误中提到的文件位于项目 Pods 中,并且libPods.a库已正确链接到项目。 这是调试时的.xconfig文件(在发布时是相同的):

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/betting-core"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/betting-core"
OTHER_LDFLAGS = -ObjC -l"Pods-Bot-betting-core"
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
PODS_ROOT = ${SRCROOT}/Pods

图书馆支持该架构,如下面的屏幕所示: supported architecture

2 个答案:

答案 0 :(得分:4)

今天有类似的问题。我能够通过删除所有派生数据来解决问题:Windows - >项目 - >选择您的工作区 - >点击"删除..."旁边"派生数据"在右边。

答案 1 :(得分:0)

这为我做了

确保您的项目目标在构建设置中的其他链接器标志中有$(继承)。