簡體   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