【问题标题】:Undefined symbols for architecture i386 while building Cordova 3.4 application构建 Cordova 3.4 应用程序时架构 i386 的未定义符号
【发布时间】:2014-02-25 11:10:04
【问题描述】:

在我的 Mac 上构建 Cordova 应用程序时,我收到构建错误 Undefined symbols for architecture i386。我正在使用 Cordova 3.4 版和 Xcode 5.0.2。

这是我项目的 Xcode 属性 Build Settings -> Architectures 的快照

Undefined symbols for architecture i386:
  "_AudioServicesAddSystemSoundCompletion", referenced from:
      _playBeep in CDVNotification.o
  "_AudioServicesCreateSystemSoundID", referenced from:
      _playBeep in CDVNotification.o
  "_AudioServicesDisposeSystemSoundID", referenced from:
      _soundCompletionCallback in CDVNotification.o
  "_AudioServicesPlaySystemSound", referenced from:
      -[CDVVibration vibrate:] in CDVVibration.o
      _playBeep in CDVNotification.o
  "_AudioServicesRemoveSystemSoundCompletion", referenced from:
      _soundCompletionCallback in CDVNotification.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
    Ld build/emulator/barcodeScanner.app/barcodeScanner normal i386
(1 failure)
Error: /Users/dipin/Projects/barcodeScanner/platforms/ios/cordova/build: Command failed with exit code 65
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:112:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Process.ChildProcess._handle.onexit (child_process.js:802:5)
DIPINs-MacBook-Air:barcodeScanner dipinkumarkrishnan$ cordova -v
3.4.0-0.1.0

请帮我解决这个错误。 Android 构建适用于同一个项目。

干杯!

【问题讨论】:

    标签: ios ios7 xcode5 cordova-3


    【解决方案1】:

    您可能缺少AudioToolbox.framework。将此添加到目标的构建阶段,然后重试。

    【讨论】:

    • 那行得通。添加AudioToolbox.framework 后,它工作正常。
    • Cordova 3.6,Xcode 6。这个解决方案有效!我需要将 AUdioToolbox 添加到 Build Phases 的“Link Binary With Libraries”部分
    • 几乎相同的错误:体系结构 i386 的未定义符号:“_SCNetworkReachabilityScheduleWithRunLoop”,引用自:CDVReachability.o 中的-[CDVReachability startNotifier] “_SCNetworkReachabilitySetCallback”,引用自:CDVReachability.o 中的-[CDVReachability startNotifier] ld:未找到架构 i386 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)** BUILD FAILED ** 以下构建命令失败:Ld build/emulator/XXX.app /XXX normal i386 (1 failure) 请帮忙!!!
    • 对于上面缺少 _SCNetworkReachabilityScheduleWithRunLoop 的@BraianMellor:我发现我必须添加 SystemConfiguration.framework,它似乎没有通过网络信息插件 (Cordova iOS 3.8.0) 添加。
    猜你喜欢
    • 1970-01-01
    • 2012-02-09
    • 2011-08-14
    • 2011-10-30
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多