Reputation: 6213
I'm working on a project that uses sqlite3. When I build the project, I get an error on this statement sqlite3 _wordsClues;
the error is Unknown type name 'sqlite3'
so it seems the library can't be found. I have libsqlite3.0.dylib
linked in the build phase. There is another option there I could use called libsqlite3.dylib
but I haven't used it.
In my pch I have had at various points <sqlite3.h>
"sqlite3.h"
and "/usr/include/sqlite3.h"
None of these combinations have worked (found by looking around on SO).
Any suggestions? I must be missing something simple. Thanks.
Upvotes: 1
Views: 6265
Reputation: 25740
This page: http://klanguedoc.hubpages.com/hub/Tutorial-on-Creating-an-IOS-5-SQLite-Database-Application-IOS-5-SQLite has a very good example with the exact steps.
Basically, you need to link against usr/lib/sqlite_3.0.lib
and #import <sqlite3.h>
Upvotes: 3