【问题标题】:Undefined symbols for architecture armv7s:架构 armv7s 的未定义符号:
【发布时间】:2013-01-27 20:33:17
【问题描述】:

所以我正在尝试将其实施到我当前的项目中:

https://github.com/mobitar/MBAlertView

Wenn 我尝试在我的应用程序中使用它却收到此错误:

Ld /Users/florianschaal/Library/Developer/Xcode/DerivedData/Janssenapp-egfiwitwudiuhubsglmuhxxuafya/Build/Products/Debug-iphoneos/Janssenapp.app/Janssenapp 正常的armv7s cd /Users/florianschaal/Developer/Janssenapp setenv IPHONEOS_DEPLOYMENT_TARGET 6.1 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/ usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/florianschaal/Library/Developer/Xcode/DerivedData/Janssenapp-egfiwitwudiuhubsglmuhxxuafya/Build/Products/Debug-iphoneos -L/Users/florianschaal/Developer/Janssenapp/Janssenapp/ZBarSDK -F/Users/florianschaal/Library/Developer/Xcode/DerivedData/Janssenapp-egfiwitwudiuhubsglmuhxxuafya/Build/Products/Debug-iphoneos -filelist /Users/florianschaal/Library/Developer/Xcode/DerivedData/Janssenapp-egfiwitwudiuhubsglmuhxxuafya/Build/Intermediates/Janssenapp.build/Debug-iphoneos/Janssenapp.build/Objects-normal/armv7s/Janssenapp.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/florianschaal/Library/Developer/Xcode/DerivedData/Janssenapp-egfiwitwudiuhubsglmuhxxuafya/Build/ Products/Debug-iphoneos/Janssenapp.app/Janssenapp

架构 armv7s 的未定义符号:
“_OBJC_CLASS_$_CABasicAnimation”,引用自: MBSpinningCircle.o "_kCAMediaTimingFunctionEaseOut" 中的 objc-class-ref,引用自: - [MBAlertView animationWithValues:times:duration:] 在MBAlertView.o "_kCATransitionFade",引用自: -[UIView(Animations) addFadingAnimationWithDuration:] 在 UIView+Animations.o "_kCAMediaTimingFunctionEaseInEaseOut", 参考自: - [UIView(Animations) animationPop] 在 UIView+Animations.o - [UIView(Animations) addPulsingAnimation] 在 UIView+Animations.o -[UIView(Animations) addFadingAnimationWithDuration:] in UIView+Animations.o "_kCATransitionFromBottom",引用自: -[UIView(Animations) addFadingAnimationWithDuration:] in UIView+Animations.o "_OBJC_CLASS_$_CATransition",引用自: UIView+Animations.o“_kCAMediaTimingFunctionEaseIn”中的objc-class-ref,引用自: -MBAlertView.o "_kCAFillModeForwards" 中的[MBAlertView addDismissAnimation],引用自: - [UIView(Animations) animationPop] 在 UIView+Animations.o - [UIView(Animations) addPulsingAnimation] 在 UIView+Animations.o - [MBAlertView animationWithValues:times:duration:] 在MBAlertView.o "_OBJC_CLASS_$_CAMediaTimingFunction",引用 从: UIView+Animations.o 中的 objc-class-ref MBAlertView.o "_OBJC_CLASS_$_CAKeyframeAnimation" 中的 objc-class-ref,引用自: UIView+Animations.o 中的 objc-class-ref MBAlertView.o "_CATransform3DMakeScale" 中的 objc-class-ref,引用自: - [UIView(Animations) animationPop] 在 UIView+Animations.o - [UIView(Animations) addPulsingAnimation] 在 UIView+Animations.o -MBAlertView.o 中的 [MBAlertView addDismissAnimation] - [MBAlertView addBounceAnimationToLayer:] 在MBAlertView.o - [MBAlertView didSelectBodyLabel:] 在MBAlertView.o - [MBAlertView didHighlightButton:] 在 MBAlertView.old 中:未找到架构 armv7s 的符号:错误:链接器 命令失败,退出代码为 1(使用 -v 查看调用)

【问题讨论】:

  • 如果你不需要它,干脆从那个项目中扔掉demo,这似乎是罪魁祸首。

标签: iphone ios objective-c


【解决方案1】:

我已经下载了 MBAlertView 存储库,然后编译了示例项目并且它可以工作。之后,我将 MBAlertView 目录添加到我的项目中,并在我在项目文件的 Build Phases 的 Link Binary With Librarys 部分添加 QuartzCore.framework 后开始工作。

【讨论】:

  • 添加了 QuartzCore.framework,现在所有错误都消失了。谢谢!
【解决方案2】:

您只需看看以下可能对您有帮助的问题

  1. Question 1

  2. Question 2

【讨论】:

    【解决方案3】:

    除非您正在编写高性能游戏并使用汇编语言编写,否则只需在构建设置中关闭 armv7s 架构即可。这对普通应用程序没有任何影响(它是 iphone5 中的处理器)。

    【讨论】:

    • 构建设置:有效架构 - 只需删除 armv7s
    • 现在我得到这个错误:没有要编译的架构(ONLY_ACTIVE_ARCH=YES,active arch=armv7s,VALID_ARCHS=armv7)。那么如何设置 armv7 处于活动状态?
    • 如果有效架构 = armv7 然后将构建活动架构设置为否,它应该只构建 armv7。还要确保架构设置也只显示 armv7
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-04
    • 1970-01-01
    • 1970-01-01
    • 2012-12-14
    • 1970-01-01
    • 1970-01-01
    • 2014-08-07
    相关资源
    最近更新 更多