使用百度地图2.9sdk Undefined symbols for architecture x86_64: "_NSBackgroundColorAttributeName", 问题解决方法

在使用百度地图SDK2.9时出现如下错误:

Undefined symbols for architecture x86_64:

"_NSBackgroundColorAttributeName", referenced from:

_baidu_vi::vi_map::GenTextTextrue(unsigned int&, unsigned short*, unsigned int, unsigned int, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned long, unsigned long, unsigned long, unsigned int) in BaiduMapAPI_Base(VBGL.o)

或者是:

"_OBJC_CLASS_$_UIApplication", referenced from:

objc-class-ref in BaiduMapAPI_Base(BMLogService.o)

objc-class-ref in BaiduMapAPI_Utils(BMKNavigation.o)

objc-class-ref in BaiduMapAPI_Utils(BMKOpenInternal.o)

objc-class-ref in BaiduMapAPI_Map(MapView.o)

objc-class-ref in BaiduMapAPI_Base(VDeviceAPI.o)

这样的错误,在设置属性的估计你也是和我一样,在设置属性的时候出现这样的坑

解决方法是:(我的是Xcode7.2, 百度地图SDK2.9.1)

Build Settings ->Compile Sources As (可直接搜索 compile sources 就可以找到该属性)设置属性的值为Objective-C  (特别注意,千万别设置成 Objective-C++ )。我的就是设置成Objective-C++  出现的错误。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容