iOS:架构 i386 的 undefined symbol

标签 ios objective-c xcode llvm-clang

我正在尝试实现 ios-oauthconsumer 但我收到此错误:

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

我尝试添加此 solution 之后的文件但 Xcode 将文件重新添加到项目中。例如:

enter image description here 你们中有人知道我可以将文件添加到“编译源”而无需重新添加文件的方法吗?

非常感谢您的帮助。

最佳答案

确保需要链接的每个源文件都是目标的编译源部分的一部分。您可以通过在导航器 Pane 中选择您的项目(如屏幕截图所示)并展开此处显示的部分来验证这一点:

Xcode Compile Sources

您还可以通过选择文件并在 xcode 的 Utilities Pane 中查看其目标成员身份来验证这一点。

Target Membership

关于iOS:架构 i386 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43666936/

相关文章:

ios - 执行优先级非常低的代码

objective-c - 使用 Objective-C 和 Cocoa 框架处理 .pkg(Mac OS X 软件包)文件

objective-c - NSURLSession downloadTask 不释放内存

iphone - 如何在 iPhone 3G 上从 UIImagePickerController 选择视频?

ios - 在 iOS 设备上运行时, ionic 栏标题不居中

iOS Swift 应用程序 - 数据库

ios - InstantiateViewController 导致 nil 导致它崩溃

iphone - UITableViewController 不会执行 UIDeviceOrientationPortraitUpsideDown 方向

ios - Swift 3 - UIPageViewController 实现返回空(空白) View

ios - 我可以在没有 Apple Developer Program 的情况下在我的 iOS 设备上测试我的 Ionic 应用程序吗