给项目添加百度地图,修改podfile文件添加pod ‘BaiduMapKit’
pod下载好了,编译报错:
duplicate symbols for architecture arm64 " “_baidu_framework::IVLongLinkFactory::CreateInstance(_baidu vi::CVString const&, void**)”,
referenced from:
_baidu_framework::CCLongLinkChannel::CCLongLinkChannel() in
BaiduMapAPI_Map(CloudControlChannel.o)
_baidu_framework::CCLongLinkDataChannel::CCLongLinkDataChannel() inBaiduMapAPI_Map(CloudControlChannel.o)
_baidu_framework::CCBinaryLongLinkChannel::CCBinaryLongLinkChannel() inBaiduMapAPI_Map(CloudControlChannel.o)
ld: symbol(s) not found for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbol:_baidu_framework.lVLongLinkFactory.:Createlnstance(_baidu _vi.:CVString const&, void**Linker command failed with exit code 1 (use -v to see invocation)
试了很多种方式都不行,最后给百度提工单,第二天回复
您好,工程配置Build Settings中other linker flags中添加-ObjC。 如果有-all load的话需要将其删除。
删除 -all_load 编译正常。