Xcode:构建失败:错误消息

时间:2014-03-23 16:04:12

标签: ios xcode build compiler-errors

我正在构建并运行我的Xcode应用程序,但由于以下错误消息,我收到构建失败消息:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_SFAccountManager", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SFApplication", referenced from:
      objc-class-ref in main.o
  "_OBJC_CLASS_$_SFAuthenticationManager", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SFLogger", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SFRestAPI", referenced from:
      objc-class-ref in OrderVC.o
      objc-class-ref in PerformanceVC.o
      objc-class-ref in CustomerDetailsVC.o
      objc-class-ref in AppDelegate.o
  "_kSFLoginHostChangedNotification", referenced from:
      -[AppDelegate init] in AppDelegate.o
      -[AppDelegate dealloc] in AppDelegate.o
  "_kSFUserLogoutNotification", referenced from:
      -[AppDelegate init] in AppDelegate.o
      -[AppDelegate dealloc] in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何解决此/这些问题?

3 个答案:

答案 0 :(得分:3)

我会在你的项目中将Architectures设置为$(ARCHS_STANDARD_32_BIT),这对iOS构建和OS X /模拟器构建都是正确的。

问题是您的库不是为x86_64构建的,但您的项目正在尝试为i386和x86_64构建,因此链接步骤失败。 Apple将Xcode 5.1中的默认架构更改为包含64位架构。

有关详细信息,请参阅其他问题:

答案 1 :(得分:2)

点击xcode中的项目,然后转到构建设置 - >有效的体系结构并删除arm64也将Standard Architectures更改为armv7和armv7s。清理并重新运行项目

答案 2 :(得分:1)

您似乎需要在项目中包含Salesforce Mobile SDK iOS框架。