【问题标题】:XCODE 6.1.1 Framework issueXCODE 6.1.1 框架问题
【发布时间】:2015-06-26 13:11:31
【问题描述】:

我已经通过XCode 6.1.1搭建了一个cocoa框架,也创建了一个通用版本的框架,然后当我将框架导入项目时,编译错误:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_UIResponder", referenced from:
      _OBJC_CLASS_$_AppDelegate in AppDelegate.o
  "_OBJC_METACLASS_$_UIResponder", referenced from:
      _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
  "_UIApplicationMain", referenced from:
      _main in main.o
  "_OBJC_METACLASS_$_UIViewController", referenced from:
      _OBJC_METACLASS_$_ViewController in ViewController.o
  "_OBJC_CLASS_$_UIViewController", referenced from:
      _OBJC_CLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

想知道为什么吗? 以及如何分析问题的原因?

【问题讨论】:

  • 您的 AppDelegate 是否在 Objective-C++(.mm 文件)中?我刚遇到这个问题,添加 UIKit.framework 进行链接解决了这个问题。我仍在寻找解释。

标签: ios objective-c frameworks xcode6


【解决方案1】:

您必须在构建之前将 armv7 架构添加到您的框架中。
因为你使用框架的项目有这个架构。

你也可以查看框架的路径(framework search-path)

【讨论】:

  • 该框架已经构建了 armv7 架构。检查了几次
猜你喜欢
  • 1970-01-01
  • 2023-03-29
  • 2015-04-09
  • 1970-01-01
  • 2015-05-17
  • 2023-03-25
  • 2011-06-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多