4
votes

SQLite is available as

A complete VSIX package with an extension SDK and all other components needed to use SQLite for application development with Visual Studio 2012 targeting Windows Phone 8.0.

But I need to do some modification in source code. Tim Heuer in his blog described how to build sqlite for WinRT.

The main part I guess:

Build the DLL:  
    nmake -f makefile.msc sqlite3.dll FOR_WINRT=1  
    If building for ARM: 
        nmake -f makefile.msc sqlite3.dll FOR_WINRT=1 OPTS=/DWINAPI_FAMILY=WINAPI_PARTITION_APP

What options should be specified to build for Windows Phone 8?

Update:

I've tried

nmake -f makefile.msc sqlite3.dll FOR_WINRT=1 OPTS=-DWINAPI_FAMILY=WINAPI_PARTITION_PHONE

Result:

Console

Also I've tried

    nmake -f makefile.msc sqlite3.dll FOR_WINRT=1 OPTS=-DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP

Result: Console

1
Could this answer be useful?user1419445
@Enzino There is described a way to compile for WinRT/ARM. The resulting dll can not be used in Windows Phone 8/ARM.Andrei Schneider

1 Answers

0
votes

Sqlite includes some tools to be built and run during the build process, i.e. on the platform you're building on: mkkeywordhash.exe and lemon.exe. These tools should be built by cl.exe targetting your build platform, not your target platform.

NCC variable is used to specify the location of native compiler:

nmake -f makefile.msc sqlite3.dll <your options> NCC="c:\Program Files\..path-to-native\cl.exe"

It might be enough. If another problem arises, find NCC in Makefile.msc and look around it for more information. E.g. you might have to set the following parameters:

XCOMPILE=1
USE_NATIVE_LIBPATHS=1
NCRTLIBPATH (where are your native CRT libraries?)
NSDKLIBPATH (where are your native SDK libraries?)