0

嘿,我是 iphone 开发的新手。我正在尝试在我的应用程序中播放音频文件。但是我收到了这个错误。谁能帮我解决这个问题。我已经添加了 AVFoundation 和 CoreGraphics 框架。所以请帮我解决这个问题。先感谢您。

ld "/Users/keshav/Desktop/Build Files/SampleAudioCode-gedwwrowqwoobjgojkmypquuiukj/Build/Products/Debug-iphonesimulator/SampleAudioCode.app/SampleAudioCode" normal i386 cd /Volumes/d/projects/sample/SampleAudioCode setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/ Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs /iPhoneSimulator5.1.sdk "-L/Users/keshav/Desktop/Build Files/SampleAudioCode-gedwwrowqwoobjgojkmypquuiukj/Build/Products/Debug-iphonesimulator" "-F/Users/keshav/Desktop/Build Files/SampleAudioCode-gedwwrowqwoobjgojkmypquuiukj/Build/Products/Debug-iphonesimulator"-filelist"/Users/keshav/Desktop/Build Files/SampleAudioCode-gedwwrowqwoobjgojkmypquuiukj/Build/Intermediates/SampleAudioCode.build/Debug -iphonesimulator/SampleAudioCode.build/Objects-normal/i386/SampleAudioCode.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework CoreFoundation -framework AVFoundation -framework UIKit -框架基础 -framework CoreGraphics -o "/Users/keshav/Desktop/Build Files/SampleAudioCode-gedwwrowqwoobjgojkmypquuiukj/Build/Products/Debug-iphonesimulator/SampleAudioCode.app/SampleAudioCode"

架构 i386 的未定义符号:“_AudioServicesCreateSystemSoundID”,引用自:ViewController.o 中的-[ViewController viewDidLoad] “_AudioServicesPlaySystemSound”,引用自:ViewController.o ld 中的-[ViewController viewDidLoad]:未找到架构 i386 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

4

1 回答 1

1

您还必须AudioToolbox在 Xcode 中添加框架以消除此链接器错误。

于 2012-08-03T04:43:10.247 回答