-->

iphone sqlite static linking?

2020-07-18 07:24发布

问题:

Anyone out there statically linking sqlite (as opposed to using the dynamic linking)?

I am having issues with users with jailbroken phones not having the same version of sqlite that the stock iPhone assumes (and hence causing crashes). I'm assuming that staticly linking a known version of sqlite in my app is the answer...

回答1:

I needed to have Full Text support (with FTS3 module)

All I did was grab the Sqlite Amalgamation from here: http://www.sqlite.org/amalgamation.html and dropped the .h and .c into my project and it works.



回答2:

Have you found the exact source of the crash? Are you sure it's not a bug in your code that's exposed by the different version of SQLite?

When I came across a similar problem to this I found that it was actually a bug in my code -- I was sqlite3_resetting a prepared statement too early.



回答3:

You could download the source and create a static library yourself?