您的位置:首页 > 大数据 > 物联网

iOS sdk 4.3.2 AudioToolbox导入框架

2013-08-07 14:29 211 查看
错误源:在试图控制器中,想应用AudioToolbox类中的函数AudioServicesCreateSystemSoundID输出声音,虽然已添加了头文件,但是链接时却出现了错误:

Ld build/Debug-iphonesimulator/Pickers.app/Pickers normal i386

cd /Users/wang/Documents/Pickers

setenv MACOSX_DEPLOYMENT_TARGET 10.6

setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -L/Users/wang/Documents/Pickers/build/Debug-iphonesimulator
-F/Users/wang/Documents/Pickers/build/Debug-iphonesimulator -filelist /Users/wang/Documents/Pickers/build/Pickers.build/Debug-iphonesimulator/Pickers.build/Objects-normal/i386/Pickers.LinkFileList -mmacosx-v
4000
ersion-min=10.6 -framework Foundation -framework
UIKit -framework CoreGraphics -o /Users/wang/Documents/Pickers/build/Debug-iphonesimulator/Pickers.app/Pickers

Undefined symbols:

  "_AudioServicesCreateSystemSoundID", referenced from:

      -[SingleController playwithSound] in SingleController.o

      -[SingleController spin] in SingleController.o

  "_AudioServicesPlaySystemSound", referenced from:

      -[SingleController playwithSound] in SingleController.o

      -[SingleController spin] in SingleController.o

ld: symbol(s) not found

collect2: ld returned 1 exit status

可以点击项目名——》TARGETS下的项目名——》Build Phases——》Link Binary whith Libararies ——》按+,添加AudioToolbox

1.
Foundation: 所有的面向对象语言都会有一些标准结构: value , collection , String, dates, lists, thread等等.所有的这些都在Foundation framework里面(可以对比C++的STL)

          2.
Appkit: 所有和用户界面相关的类都在这里. Windows,buttons,text field, event, drawing. 它还有个名字: ApplicationKit

          3.
Core Data: Core Data可以方便的让你把你的对象存储成文件,或是从文件中加载你的对象.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: