sqlite3 integration

sqlite3 integration
0.0 0


Hi All,

Is there any official documentation on cross-platform sqlite3 integration?
I noticed in …/external/sqlite3/ there are some sqlite3 header files, but no .c files - so I’m not sure what to do with that.

It seems the best way to integrate is to just add the sqlite3.c & .h to your project and use CCFileUtils for path management. I’m wondering if there are any other best practices - my target platforms are Android and iOS.

Also, here are all the posts I’ve found on the topic so far:



Nevermind… i think.

This solution works so far for me (linux and Android).

Note: i downloaded and linked to the sqlite3 .h & .c source


Ultimately the reason I went with Cocos2d-X over LibGDX was the easy integration with SQLite.

I’m using CppSQLite3 + sqlite3 and it is working very well on Android, iOS, Windows, Mac, etc.


Ah, cool, thanks for the response.
CppSqlite3 seems handy. We’ll take a look.


I am working on a trivia(quiz) game and have near about 1500 rows of data.i have created the database using SQLite Manager(firefox plugin) . so i wanted to use a Pre-Populated SQLite database.
A tutorial/Link for integrating sqlite3 database to cocos 2d-x V.3.6 that will work on both iOS and android platform…?


Sqlite3 is a perfect fit for your situation. My game has 10K+ rows and still runs fun, so 1500 shouldn’t be an issue.

I think Sqlite actually ships with Cocos2d-x now which lets you avoid what I did (adding the C files to my project and inevitably customizing them.)


“I think Sqlite actually ships with Cocos2d-x now” any tutorials or documentation /links regarding this would be a great help if u mention on comment !!