简体   繁体   English

构建到64位时,phonegap cordova xcode链接失败

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

i have a cordova project in xcode 5.0.2 it works perfectly on a iphone5c but didnt work on iphone5s i read some on this and thought that the problem is i have to build my project on 64bit architecture. 我在xcode 5.0.2中有一个cordova项目,它在iphone5c上完美运行但在iphone5上没有工作我读了一些关于此问题并认为问题是我必须在64位架构上构建我的项目。
i make this build settings: 我做这个构建设置:
architecture - standart architecture (including 64-bit)(armv7, armv7s, arm64) 架构 - 标准架构(包括64位)(armv7,armv7s,arm64)
build active architecture only - no 仅建立活动架构 - 没有

and when i build i get this errors: 当我建立我得到这个错误:

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)

any body knows what to do? 任何人都知道该怎么办?
thanks a lot. 非常感谢。

The problem seems to be that your version of libCordova isn't compiled for arm64. 问题似乎是你的libCordova版本没有为arm64编译。

The quick fix is to remove arm64 from your list of build architectures - the 5s will happily run code compiled for armv7. 快速解决方法是从构建体系结构列表中删除arm64 - 5s将很乐意运行为armv7编译的代码。

The proper fix is to upgrade Cordova to a version that has arm64 versions of the libraries compiled. 正确的解决方法是将Cordova升级到具有编译的arm64版本库的版本。

The problem is with Xcode 5.1 coming with 64 bit support. 问题是Xcode 5.1支持64位。

The cordova project created contains cordova library ('CordovaLib.xcodeproj' project in the project navigator pane) which is not configured for arm64. 创建的cordova项目包含cordova库(项目导航器窗格中的“CordovaLib.xcodeproj”项目),该项目未针对arm64进行配置。

To resolve this issue, click on 'CordovaLib.xcodeproj' where it shows project settings goto 'Architectures' and table and change all architectures to '$(ARCHS_STANDARD)' or Standard Architectures. 要解决此问题,请单击“CordovaLib.xcodeproj”,其中显示项目设置转到“架构”和表,并将所有体系结构更改为“$(ARCHS_STANDARD)”或标准体系结构。 (They have been initially set to different values which is the reason for build failing) (它们最初设置为不同的值,这是构建失败的原因)

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

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