简体   繁体   English

体系结构i386 / armv7的未定义符号[cocoapods]

[英]Undefined symbols for architecture i386/armv7 [cocoapods]

After installing a custom pod with $ pod install command, I can't build the project because there are some errors like below (on my Xcode the error is about armv7 , on an another Xcode, the error is about i386 architecture ): 使用$ pod install命令安装自定义pod后,由于以下错误,我无法构建该项目(在我的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)

Files mentioned in the error are in the project Pods and the libPods.a library is correctly linked to the project. 错误中提到的文件位于项目Pods中 ,并且libPods.a库已正确链接到项目。 This is the .xconfig file on debug (on release is the same): 这是调试时的.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

The library support the architecture as you can see in the screen below: 如下面的屏幕所示,该库支持该体系结构: 支持的架构

Had a similar problem today. 今天也有类似的问题。 I was able to resolve the issue by deleting all derived data: Windows -> Projects -> Select your workspace -> click "Delete..." next to "Derived Data" on the right side. 我可以通过删除所有派生数据来解决该问题:Windows->项目->选择您的工作区->单击右侧“派生数据”旁边的“删除...”。

This did it for me 这为我做到了

Make sure your Project targets have $(inherited) present in the Other Linker Flags in Build Settings. 确保您的项目目标在“构建设置”中的“其他链接器”标志中有$(继承)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM