要使用Sqlite进行开发,需要用sqlite3_config()函数设置多线程模式,结果发现调用此函数一直ERROR,错误码是21.查看了相关的错误码文档,不明所以。。。之后果断google,找到了问题的所在和解决方案:
I struggled long and hard with this as well and finally got the solution.
sqlite3_config() needs to be called before sqlite3_initialize(). However, the OS might initialize sqlite for us so I also do a sqlite3_shutdown() before the