在使用百度地图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++ 出现的错误。