Undefined symbols for architecture i386 while buil

2020-04-20 12:17发布

I'm getting the build error Undefined symbols for architecture i386 on my Mac when building a Cordova application. I'm using Cordova version 3.4 and Xcode 5.0.2.

Here is the snapshot of my project's Xcode properties Build Settings -> Architectures enter image description here

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

Please help me with this error. Android build works fine for the same project.

Cheers!

1条回答
2楼-- · 2020-04-20 12:56

You are probably missing AudioToolbox.framework. Add this to your target's build phase and try again.

查看更多
登录 后发表回答