views:

43

answers:

1

I imported the libsqlite3.0.dylib framework but this code

sqlite3 *database;

generates an error saying that sqlite3 is undeclared.

+3  A: 
#import <sqlite3.h>
To explain the problem and not just the solution: @awakeFromNib, you *linked against* the libsqlite3.0.dylib library (not a framework), but you did not import *the header*. You must import the header so that the compiler knows what SQLite terms you're going to use and how they can be used (e.g., function prototypes), and you must link against the library so that the linker can resolve these terms to actual functions for you to call.
Peter Hosey