在我源文件中加
#include "sqlite3/include/sqlite3.h"
在调用到的地方写
sqlite3 *pdb = NULL;//1数据库指针
std::string path = FileUtils::getInstance()->getWritablePath() + "save.db";//2指定数据库的路径
std::string sql;
int result;
result = sqlite3_open(path.c_str(), &pdb);//3打开一个数据库,如果该数据库不存在,则创建一个数据库文件
if (result != SQLITE_OK)
{
CCLOG("open database failed, number%d", result);
}
直接编译报错,不知道这是什么问题,麻烦大神看下了,多谢,下面的图是报的错