簡體   English   中英

構建到64位時,phonegap cordova xcode鏈接失敗

[英]phonegap cordova xcode link failed when build to 64bit

我在xcode 5.0.2中有一個cordova項目,它在iphone5c上完美運行但在iphone5上沒有工作我讀了一些關於此問題並認為問題是我必須在64位架構上構建我的項目。
我做這個構建設置:
架構 - 標准架構(包括64位)(armv7,armv7s,arm64)
僅建立活動架構 - 沒有

當我建立我得到這個錯誤:

ld: warning: ignoring file /Users/chana/Library/Developer/Xcode/DerivedData/Pitaron-    echagbyhunbeprbdfodckoblgtuq/Build/Products/Debug-iphonesimulator/libCordova.a, file was built for archive  which is not the architecture being linked (x86_64):  /Users/chana/Library/Developer/Xcode/DerivedData/Pitaron-echagbyhunbeprbdfodckoblgtuq/Build/Products/Debug- iphonesimulator/libCordova.a
Undefined symbols for architecture x86_64:
  "_CDVLocalNotification", referenced from:
  -[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o
   "_CDVPluginHandleOpenURLNotification", referenced from:
  -[AppDelegate application:handleOpenURL:] in AppDelegate.o
  "_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
  _OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_CLASS_$_CDVCommandQueue", referenced from:
   _OBJC_CLASS_$_MainCommandQueue in MainViewController.o
  "_OBJC_CLASS_$_CDVViewController", referenced from:
  _OBJC_CLASS_$_MainViewController in MainViewController.o
  "_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
  _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_METACLASS_$_CDVCommandQueue", referenced from:
  _OBJC_METACLASS_$_MainCommandQueue in MainViewController.o
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
  _OBJC_METACLASS_$_MainViewController in MainViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何人都知道該怎么辦?
非常感謝。

問題似乎是你的libCordova版本沒有為arm64編譯。

快速解決方法是從構建體系結構列表中刪除arm64 - 5s將很樂意運行為armv7編譯的代碼。

正確的解決方法是將Cordova升級到具有編譯的arm64版本庫的版本。

問題是Xcode 5.1支持64位。

創建的cordova項目包含cordova庫(項目導航器窗格中的“CordovaLib.xcodeproj”項目),該項目未針對arm64進行配置。

要解決此問題,請單擊“CordovaLib.xcodeproj”,其中顯示項目設置轉到“架構”和表,並將所有體系結構更改為“$(ARCHS_STANDARD)”或標准體系結構。 (它們最初設置為不同的值,這是構建失敗的原因)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM