标签:
百度地图遇到问题的解决方式
1.
以下最新版的百度地图SDK2.9.0遇到的编译错误,应该是因为XCode默认使用的C++标准库是苹果自己的libc++(LLVM C++ standard library with c++11 support),而百度地图SDK中使用的C++标准库是GNU C++的。 解决方法,在target的build settings中搜索“c++ standard library”,将其设置为“libstdc++(GNU C++ standard library)” 2.将一个.m 文件改成 .mm 3.导入框架:CoreTelephony.framework 4.错误:Undefined symbols for architecture i386: "_sqlite3_backup_finish", referenced from: _loadOrSaveDb in FMDatabase+InMemoryOnDiskIO.o "_sqlite3_backup_init", referenced from: _loadOrSaveDb in FMDatabase+InMemoryOnDiskIO.o "_sqlite3_backup_step", referenced from: _loadOrSaveDb in FMDatabase+InMemoryOnDiskIO.o "_sqlite3_bind_blob", referenced from: -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o "_sqlite3_bind_double", referenced from: -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o "_sqlite3_bind_int", referenced from: -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o "_sqlite3_bind_int64", referenced from: -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o "_sqlite3_bind_null", referenced from: -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o "_sqlite3_bind_parameter_count", referenced from: -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o "_sqlite3_bind_parameter_index", referenced from: -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o
解决的办法:这个错误的发生原因一般是“XXX”这个文件(类库)虽然引入了工程中,但是由于种种原因(常见于多人开发,svn同步不规范)导致“XXX”并未被添加到project.pbxproj这个文件中。 解决方法是点击工程,在targets界面中找到Build Phases,根据提示信息“XXX”来判断缺少什么文件,一般如果缺少自定义的文件,XXX会是缺少的类名,那么就在Complie Sources中加入该文件。如果缺少类库,则在Link Binary With Libraries中加入该类库。 而上面问题是因为少在Link Binary With Libraries 中加入 libsqlite3.dylib ,添加后就可以编译通过。 2./* 1. .c :指的是项目中支持编译语言为C 语言 2. .m :指的是项目中支持的编译语言为c / oc 3. .mm :指的是项目中支持的编译语言为c / oc/c++ 4. .cpp :值得是编译语言包含了C++ 语言 */ |
标签:
原文地址:http://www.cnblogs.com/meixian/p/5370938.html