繁体   English   中英

XCode中的Clang错误

[英]Clang Error in XCode

我的应用程序在xcode 4.4.1中运行良好,但我刚刚更新到4.5,现在我遇到了一个clang错误。 甚至不确定它讲的是什么,有没有人经历过这个或者能否阐明我如何修复它? 这是确切的错误:

Ld /Users/natehamilton/Library/Developer/Xcode/DerivedData/LCBCChurch-hacgcivdmhbavlecueatfvjbekxn/Build/Intermediates/LCBCChurch.build/Debug-iphoneos/LCBCChurch.build/Objects-normal/armv7s/LCBCChurch normal armv7s
    cd "/Users/natehamilton/Desktop/Current Projects/Work/Projects/Mobile App/LCBCChurch"
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.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.0.sdk -L/Users/natehamilton/Library/Developer/Xcode/DerivedData/LCBCChurch-hacgcivdmhbavlecueatfvjbekxn/Build/Products/Debug-iphoneos -F/Users/natehamilton/Library/Developer/Xcode/DerivedData/LCBCChurch-hacgcivdmhbavlecueatfvjbekxn/Build/Products/Debug-iphoneos -F/Users/Shared/Cordova/Frameworks -filelist /Users/natehamilton/Library/Developer/Xcode/DerivedData/LCBCChurch-hacgcivdmhbavlecueatfvjbekxn/Build/Intermediates/LCBCChurch.build/Debug-iphoneos/LCBCChurch.build/Objects-normal/armv7s/LCBCChurch.LinkFileList -dead_strip -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak_library /usr/lib/libSystem.B.dylib -fobjc-link-runtime -miphoneos-version-min=5.1 -framework Foundation -framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -framework AVFoundation -framework CoreLocation -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -framework CoreMedia -framework Cordova -o /Users/natehamilton/Library/Developer/Xcode/DerivedData/LCBCChurch-hacgcivdmhbavlecueatfvjbekxn/Build/Intermediates/LCBCChurch.build/Debug-iphoneos/LCBCChurch.build/Objects-normal/armv7s/LCBCChurch

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/Shared/Cordova/Frameworks/Cordova.framework/Cordova for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

将“Bu​​ild Active Architecure Only”改为Yes,它会起作用:)干杯!

armv7s架构是iPhone 5中使用的新处理器类型。看起来您的Cordova框架尚未更新以支持该新处理器,因此当clang将Cordova链接到您的iPhone 5二进制文件的应用程序时,它可以'这样做成功。 您需要获取Cordova的更新。

我通过我的项目和引用的CordovaLib项目的“Build Settings”的“Valid Architectures”字段下添加对各种体系结构的引用来实现它。 附上截图。 (我正在使用Xcode来完成此操作,而不是按照Jira案例中某人的建议在文本编辑器中编辑pbxproj文件)。

唯一需要注意的是,这种方法需要Cordova 2.0+,因为这是第一个引用Cordova项目和源代码的版本。 您需要使用这些设置构建Cordova。 如果您使用的是以前的版本并且不想升级,那么您必须获取源代码并通过对体系结构构建设置的更改来自行构建。

更多信息: https//issues.apache.org/jira/browse/CB-1360

截图

我还没有解决任何问题,但是一些开发人员在这个网址上取得了成功

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM