sir i have working with db connectivity i have written all code and i imported the header file also.but its showing the error in the line of sqlite3_exe symbol not found in architecture
help me to clear...!!!!
NSFileManager *filemgr=[NSFileManager defaultManager];
if ([filemgr fileExistsAtPath:databasePath]==NO)
{
const char *dbpath=[databasePath UTF8String];
if (sqlite3_open(dbpath, &contactDB)==SQLITE_OK)
{
char *errorMsg;
const char *sql_stmt="CREATE TABLE IF NOT EXISTS CONTACTS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, ADDRESS TEXT, PHONE NUMERIC)";
if (sqlite3_exe(contactDB, sql_stmt, NULL,NULL, &errorMsg)!=SQLITE_OK)
{
status.text=@"Failed to crate table";
}
sqlite3_close(contactDB);
}else {
status.text=@"Faild to open/create database";
}
}
the error line is
if (sqlite3_exe(contactDB, sql_stmt, NULL,NULL, &errorMsg)!=SQLITE_OK)
warning is the implicit declaration of function "sqlite3_exe" is invalid in c99. error is Undefined symbols for architecture i386:
"_sqlite3_exe", referenced from:
-[DatabaseViewController viewDidLoad] in DatabaseViewController.o
ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)