-2

I've a problem while retrieving sqlite table records. I've included

while (sqlite_step(&statement) == SQLITE_ROW) {
.....
.....
}

This statement is showing a warning 'implicit declaration of function sqlite_step is invalid in C99' and later on throwing an error 'Undefined symbols for architecture i386:"_sqlite_step",....' while compilation. Please help me out.

1
  • 1
    remove '&' from while (sqlite_step(&statement) == SQLITE_ROW)
    – P.J
    Dec 28, 2012 at 10:10

2 Answers 2

2

This line causes issue:

while (sqlite_step(&statement) == SQLITE_ROW)

Change it to

while (sqlite_step(statement) == SQLITE_ROW)
1

Try this

sqlite3_stmt *statement;
while(sqlite3_step(statement) == SQLITE_ROW)
1
  • I've included sqlite_step instead of sqlite3_step.. Working fine now.Thank you. Dec 31, 2012 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.