xcode 架构 i386 的未定义符号:“_AudioServicesCreateSystemSoundID”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7451230/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Undefined symbols for architecture i386: "_AudioServicesCreateSystemSoundID"
提问by John Bridge
I am trying to make a soundboard app and i get this error
我正在尝试制作一个音板应用程序,但出现此错误
Undefined symbols for architecture i386:
"_AudioServicesCreateSystemSoundID", referenced from:
-[S0undFXViewController sound1] in S0undFXViewController.o
-[S0undFXViewController sound2] in S0undFXViewController.o
-[S0undFXViewController sound3] in S0undFXViewController.o
-[S0undFXViewController sound4] in S0undFXViewController.o
-[S0undFXViewController sound5] in S0undFXViewController.o
-[S0undFXViewController sound6] in S0undFXViewController.o
I DONT GET IT!!!!!!!
我不明白!!!!!!!
回答by Abizern
That sort of error is usually caused by a missing framework.
这种错误通常是由缺少框架引起的。
Have you added the AudioServices framework to your project? It isn't enough to just import the header files.
您是否已将 AudioServices 框架添加到您的项目中?仅仅导入头文件是不够的。
Edit
编辑
Actually, if you turn on module support in Xcode, it is enough to just @import the Framework.
实际上,如果您在 Xcode 中打开模块支持,只需 @import 框架就足够了。