架构armv的未定义符号

时间:2012-03-24 01:25:32

标签: ios xcode architecture arm7

我的应用有问题。我收到7个Apple Mach-O Linker错误。以下是错误:

Undefined symbols for architecture armv7:
  "_OBJC_IVAR_$_SideSwipeTableViewController.sideSwipeCell", referenced from:
  -[ViewController touchUpInsideAction:] in ViewController.o
  "_OBJC_CLASS_$_SideSwipeTableViewController", referenced from:
  _OBJC_CLASS_$_ViewController in ViewController.o
  "_OBJC_METACLASS_$_SideSwipeTableViewController", referenced from:
  _OBJC_METACLASS_$_ViewController in ViewController.o
  "_OBJC_IVAR_$_SideSwipeTableViewController.tableView", referenced from:
  -[ViewController viewDidLoad] in ViewController.o
  -[ViewController touchUpInsideAction:] in ViewController.o
  "_OBJC_CLASS_$_SideSwipeTableViewCell", referenced from:
  objc-class-ref in ViewController.o
  "_OBJC_IVAR_$_SideSwipeTableViewController.sideSwipeView", referenced from:
  -[ViewController setupSideSwipeView] 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)

这让我疯了,我想解决这个问题。我一直在寻找Google,Bing和StackOverflow,虽然我确实发现了一些“未定义的架构armv7符号”问题,但它们都没有帮助过我。

我正在使用Xcode 4.3.1。我正在运行OS X Lion 10.7.3。我正在使用运行iOS 5.1的iPhone测试应用程序。

有人可以帮帮我吗?我会很感激! :)

1 个答案:

答案 0 :(得分:11)

这些链接器错误意味着名为SideSwipeTableViewController和SideSwipeTableViewCell的类未编译,但在代码中的其他位置使用。如果这些不是属于静态库的类,请确保它们位于项目的Compile Sources构建阶段。如果它们是静态库的一部分,则意味着您链接的库的版本可能是为不同的体系结构构建的。