My Application was working perfectly on Snow Leopard with Xcode 4.2. Built with no errors and ran with the SQL database with no problem. I upgraded to Lion and Xcode 4.3.2 and when I Build, I get errors of "/usr/include/sqlite3.h file not found" on my #import "/usr/include/sqlite3.h" lines of code. Any one else have this problem or have any suggestions? I have tried deleting the libsqlite3.dylib from the Project Navigator, and then adding it back via the + sign in the Build Phases tab in the Link Binary With Libraries, but the error persists.
2 Answers
6
votes
When updating from Snow Leopard to Lion and Xcode 4.2 to Xcode 4.5, your will got error: " '/usr/include/sqlite3.h' file not found".
Solution:
Add library:
"libsqlite3.0.dylib"in theTarget > Build PhasesChange
#import "/usr/include/sqlite3.h"to#import "sqlite.h"in your code
Update to author's post: It is not #import "sqlite.h". It is: #import <sqlite3.h>
1
votes
I think what your problem is you need to include the SQLite 3.0 Framework into your project.
Refer to this question if you don't know how to add a framework: How to “add existing frameworks” in Xcode 4?
The framework you want is libsqlite3.0.dylib
Hope this helps!