参照文档添加了libBaiduSpeechSDK.a静态库,但是运行出现了以下错误。这是什么原因,我应该怎么处理呢
Undefined symbols for architecture arm64:
"_iconv", referenced from:
BDS_TTS::doConvert(unsigned char const*, int, unsigned char*, int, void*) in libBaiduSpeechSDK.a(bds_character_coding_iconv.o)
(maybe you meant: _iconv_canonicalize)
"_iconv_open", referenced from:
BDS_TTS::convertCharacterEncoding(unsigned char const*, int, BDS_TTS::BDS_CHARSETS_T, unsigned char**, BDS_TTS::BDS_CHARSETS_T) in libBaiduSpeechSDK.a(bds_character_coding_iconv.o)
"_iconv_close", referenced from:
BDS_TTS::convertCharacterEncoding(unsigned char const*, int, BDS_TTS::BDS_CHARSETS_T, unsigned char**, BDS_TTS::BDS_CHARSETS_T) in libBaiduSpeechSDK.a(bds_character_coding_iconv.o)
BDS_TTS::doConvert(unsigned char const*, int, unsigned char*, int, void*) in libBaiduSpeechSDK.a(bds_character_coding_iconv.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
添加 iconv库即可