xcode 10.1 架构 arm64 的未定义符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53861943/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcode 10.1 Undefined symbols for architecture arm64
提问by SquareBox
I already gone so many SO threads with similar issue but none of them seems to resolve my error.
我已经去了很多类似问题的 SO 线程,但它们似乎都没有解决我的错误。
In our project we have multiple "TARGETS". Only one of the target - the very first target created ever - is archiving properly. When I try to archive other target we encounter this error
在我们的项目中,我们有多个“目标”。只有一个目标 - 有史以来创建的第一个目标 - 正在正确存档。当我尝试存档其他目标时,我们遇到此错误
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_DynamicEventData", referenced from:
objc-class-ref in DataManager.o
objc-class-ref in DataReader.o
"_OBJC_CLASS_$_DynamicDataService", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_DynamicDataConfig", referenced from:
objc-class-ref in DataManager.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I did compare the Build Setting
of the working targetto the other targets but all of them are equal. I checked the header files and they exists in our project directory. I tried to manually add the header files' path to Header Search Paths
but same result still getting the error.
我没有比较Build Setting
的的工作目标到其他目标,但所有的人都是平等的。我检查了头文件,它们存在于我们的项目目录中。我试图手动添加头文件的路径,Header Search Paths
但同样的结果仍然出现错误。
Any idea? I really need to resolve this to export an ipa file.
任何的想法?我真的需要解决这个问题才能导出 ipa 文件。
Thanks!
谢谢!
采纳答案by SquareBox
I scan manually check the Build Phases > Link Binary With Librariesof the working target vs the defected targets. I found a one framework/library that was only added to the working target the said framework isn't manage by pod that may explain why the other target doesn't have it. I think it was added manually in the project.
我手动扫描检查工作目标与缺陷目标的构建阶段> 链接二进制与库。我发现一个框架/库只添加到工作目标中,所述框架不是由 pod 管理的,这可能解释了为什么另一个目标没有它。我认为它是在项目中手动添加的。
I add the said framework to all targets and now I can build without the said error.
我将上述框架添加到所有目标,现在我可以在没有上述错误的情况下进行构建。
Thanks!
谢谢!