How to use Sqlite3 for Windows Phone 8 game

Hi, guys!
I have used sqlite3 as DB to develop a game, this game work perfect for Android and IOS,
But when i move this game to wp8 ,i found a error with sqlite3.c as below:

Error 1 error D8048: cannot compile C file ‘…\Classes\sqlite3.c’ with the /ZW option

Anyone had faced this error? Or how to use Sqlite3.c in WP8?

you couldn’t use /zw with .c file, all of the .c file should in a single project without /zw, while such project is not relationship with platform.

@chenjc Thanks, i have turn off the /ZW for c file.But still lot of error.So anyway to use Sqlite3.c?

it can use in xaml, http://www.cnblogs.com/zoyobar/archive/2013/04/15/wp1.html, I followed the steps as the link said, note that I compiled the Sqlite project ok and then added as a reference to HelloCpp, and runed ok. Thanks.

@Smallhero911
i found the same problem

one way to solve this would be to statically link sqlite3.

I also know that WINRT has a special SQLite version. I’m not sure if WP8 does. I also recall that VS 2012 had its own SQLite extension that was available when you created a new Reference. Try goggling for DSQLITE_OS_WINRT also, it might pop up something.

I tried a quick Google search to see and I came up with this also: http://wp.qmatteoq.com/working-with-sqlite-in-windows-phone-8-a-sqlite-net-version-for-mobile/

I hope it all helps you get on the right track,

have you got it?

Hi Smallhero911

I have wrote complete tutorial regarding your problem.
please visit this link:http://techbirds.in/integration-sqlite-in-cocos2d-x-with-wp8-in-visual-studio2012/
I am sure your problem will be solve.

I am very curious here, why it isn’t possible to just use the sqlite.c file for WP8?

If you don’t care about sharing data with the Windows Phone data access layer, at least.

Does this not actually work? You can’t just add the source files and build like you can for other platforms?

I have not tried, but sqlite.c works on Mac, Windows, Android, Linux and iOS unmodified.

It seems to work for me on all those platforms.

Why you just don’t use Precompiled Binaries for Windows Phone 8?

https://www.sqlite.org/download.html

Or read about compiling it here:
http://developer.nokia.com/community/wiki/Compiling_and_using_SQLite_with_Windows_Phone_8