在使用百度地圖SDK2.9時出現(xiàn)如下錯誤:
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)
這樣的錯誤蛋欣,在設(shè)置屬性的估計你也是和我一樣又碌,在設(shè)置屬性的時候出現(xiàn)這樣的坑
解決方法是:(我的是Xcode7.2爱榕, 百度地圖SDK2.9.1)
Build Settings ->Compile Sources As (可直接搜索 compile sources 就可以找到該屬性)設(shè)置屬性的值為Objective-C? (特別注意,千萬別設(shè)置成 Objective-C++ )。我的就是設(shè)置成Objective-C++? 出現(xiàn)的錯誤。