ios 架构 arm64 的未定义符号:“_OBJC_CLASS_$_PayTabCardReaderViewController”,引用自:ViewController.o 中的 objc-class-ref

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31917994/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 07:12:21  来源:igfitidea点击:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_PayTabCardReaderViewController", referenced from: objc-class-ref in ViewController.o

iosobjective-cxcode

提问by Marcel Al Mutawa

I am getting this weird error when importing a library called pay tabs

导入名为 pay tabs 的库时出现这个奇怪的错误

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

Under build settings

在构建设置下

Architectures:

架构:

Architecture Standard architectures (armv7, arm64) - $(ARCHS_STANDARD) Base SDK Latest IOS(8.4)

架构 标准架构 (armv7, arm64) - $(ARCHS_STANDARD) Base SDK 最新 IOS(8.4)

Build Active Architecture Only Debug Yes Release No

仅构建活动架构 调试 是 发布 否

Supported Platforms IOS Valid Architectures armv7 arm64

支持的平台 IOS 有效架构 armv7 arm64

回答by Mike Gledhill

Ahh, isn't Xcode great ?

啊,是不是 Xcode 很棒?

What I would recommend is this: Click on your project in the left panel, then check your architecture settings in both the Projectandthe Targetssections. enter image description here

我建议是这样的:在左侧面板中,点击您的项目,然后在这两个检查你的架构设置项目目标部分。 在此处输入图片说明

And if you have any third-party projects within your project, do the same for them aswell.

如果您的项目中有任何第三方项目,也请对它们执行相同的操作。

(I had to do this when building an Xcode project which used the MapBox iOS SDKlibrary. Annoyingly, you doneed to check this setting in each of the various Build Settings tabs, otherwise Xcode will complain.)

(在构建使用MapBox iOS SDK库的 Xcode 项目时,我必须这样做。烦人的是,您确实需要在各个构建设置选项卡中检查此设置,否则 Xcode 会报错。)

回答by Mike Demidov

Have you added the library path to Build Settings -> Libraries Search Path? Check at Build Settings -> Link Binary With Libraries that your library is added also.

您是否将库路径添加到 Build Settings -> Libraries Search Path?检查 Build Settings -> Link Binary With Libraries 是否也添加了您的库。

回答by azisseno

Go to Build Phases-> Link Binary with LibrariesAdd your third party library to this. If you could not find your library, click Add other.

转到Build Phases-> Link Binary with Libraries将您的第三方库添加到此。如果找不到您的库,请单击添加其他