iphone sqlite static linking?

浪尽此生 提交于 2019-12-06 05:13:36

问题


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?



来源:https://stackoverflow.com/questions/628908/iphone-sqlite-static-linking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!