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

 

Error:

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:

 

 

From the ""_OBJC_CLASS_$ _AVAudioPlayer ", referenced from:" in the error message, it can be seen that the reference to the _AVAudioPlayer file (or library ) is missing ;

Solution: In Build Phases-->CompileSources(items), add the .m file that reported the error, click the "+" in the lower left corner, find the .m file that reported the error in the pop-up box, select add, and add the missing .m file.

If it is a library, import the corresponding .framework in Build Phases-->Link Binary With Libraries. If this article imports AVFounddation.framework, no error will be reported.


 

Guess you like

Origin blog.csdn.net/ximiaoweilai/article/details/108471769