Xcode:构建失败:错误消息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22593334/
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
Xcode: build failed: error message
提问by Bart
I am building and running my Xcode app but I get a build failed message on account of the following error message:
我正在构建并运行我的 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)
How do I resolve this/these issue(s)?
我如何解决这个/这些问题?
回答by z00b
I would set Architectures
in your project to $(ARCHS_STANDARD_32_BIT)
, which will do the right thing for both iOS builds and OS X / simulator builds.
我将Architectures
在您的项目中设置为$(ARCHS_STANDARD_32_BIT)
,这将对 iOS 构建和 OS X / 模拟器构建做正确的事情。
The problem is that your library is not built for x86_64, but your project is trying to build for both i386 and x86_64, so the link step fails. Apple changed the default architecture in Xcode 5.1 to include 64-bit architectures.
问题是您的库不是为 x86_64 构建的,但是您的项目正在尝试为 i386 和 x86_64 构建,因此链接步骤失败。Apple 更改了 Xcode 5.1 中的默认架构以包含 64 位架构。
See these other questions for more info:
有关更多信息,请参阅这些其他问题:
回答by codester
Click on your project in xcode and go to build settings -> valid architectures and remove arm64
also change Standard Architectures
to armv7 and armv7s .Clean and rerun the project
在 xcode 中单击您的项目并转到构建设置 -> 有效架构并删除对 armv7 和 armv7s 的arm64
更改Standard Architectures
。清理并重新运行项目
回答by Cris
It looks like you need to include the Salesforce Mobile SDK iOS framework in your project.
看起来您需要在您的项目中包含 Salesforce Mobile SDK iOS 框架。