Undefined symbols for architecture x86_64: “_OBJC_CLASS_$_AVAudioPlayer“, referenced from: objc-clas

报错:

Undefined symbols for architecture x86_64:

"_OBJC_CLASS_$_AVAudioPlayer", referenced from:

objc-class-ref in AMapNaviKit(AMapNaviKit-x86_64-master.o)

"_OBJC_CLASS_$_AVSpeechSynthesisVoice", referenced from:

从错误信息的""_OBJC_CLASS_$_AVAudioPlayer",referenced from:"能够看出,是缺少_AVAudioPlayer文件(或者库)的引用;

解决方法:在Build Phases-->CompileSources(items)中,添加报错的.m文件,点左下角的"+",在弹出框中找到报错的.m文件,选中add,添加漏掉的.m文件。

如果是库的话,在Build Phases-->Link Binary With Libraries导入相对应的.framework。如本文就导入了AVFounddation.framework就不报错了。


 

猜你喜欢

转载自blog.csdn.net/ximiaoweilai/article/details/108471769