使用 $ 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)
错误中提到的文件位于项目 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"ods-Bot-betting-core"
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
PODS_ROOT = ${SRCROOT}/Pods
该库支持如下屏幕所示的架构:
今天遇到了类似的问题。我能够通过删除所有派生数据来解决该问题:Windows -> 项目 -> 选择您的工作区 -> 单击右侧“派生数据”旁边的“删除...”。
关于ios - 架构 i386/armv7 [cocoapods] 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27144191/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |