你好我得到這個eror:符號像_sqlite3_open沒有發現錯誤
Undefined symbols: "_sqlite3_open", referenced from: _main in ccRlWVer.o "_sqliite3_close", referenced from: _main in ccRlWVer.o "_sqlite3_exec", referenced from: _main in ccRlWVer.o "_sqlite3_errmsg", referenced from: _main in ccRlWVer.o "_sqlite3_close", referenced from: _main in ccRlWVer.o ld: symbol(s) not found collect2: ld returned 1 exit status
這是我的代碼:
const char * filename = "database.db";
sqlite3 * ppDb;
int rc;
rc = sqlite3_open(filename, &ppDb);
if(rc){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(ppDb));
sqlite3_close(ppDb);
exit(1);
}
char * errMsg = 0;
sqlite3_exec(ppDb, sql ,display_result, 0, &errMsg);
if(rc!=SQLITE_OK){
fprintf(stderr, "SQL error: %s\n", errMsg);
}
sqliite3_close(ppDb);
return 0;