为 Windows Phone 8 构建 SQLite

2021-09-26 00:00:00 sqlite windows-phone-8

SQLite 可用作

<块引用>

一个完整的 VSIX 包,带有一个扩展 SDK 和所有其他使用 SQLite 进行应用程序开发所需的组件面向 Windows Phone 8.0 的 Visual Studio 2012.

但是我需要对源代码做一些修改.Tim Heuer 在他的 博客 描述了如何为 WinRT 构建 sqlite.

我猜的主要部分:

<块引用>

构建DLL:nmake -f makefile.msc sqlite3.dll FOR_WINRT=1如果为 ARM 构建:nmake -f makefile.msc sqlite3.dll FOR_WINRT=1 OPTS=/DWINAPI_FAMILY=WINAPI_PARTITION_APP

应该指定哪些选项来为 Windows Phone 8 构建?

更新:

我试过了

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

结果:

我也试过了

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

结果:

解决方案

Sqlite 包括一些要在构建过程中构建和运行的工具,即在您构建的平台上:mkkeywordhash.exelemon.exe.这些工具应该由 cl.exe 针对您的构建平台构建,而不是您的目标平台.

NCC 变量用于指定本地编译器的位置:

nmake -f makefile.msc sqlite3.dll <你的选项>NCC="c:\Program Files\..path-to-native\cl.exe"

可能就够了.如果出现其他问题,请在 Makefile.msc 中找到 NCC 并查看它以获取更多信息.例如.您可能需要设置以下参数:

XCOMPILE=1USE_NATIVE_LIBPATHS=1NCRTLIBPATH(你的本地 CRT 库在哪里?)NSDKLIBPATH(你的原生 SDK 库在哪里?)

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:

Also I've tried

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

Result:

解决方案

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?)

相关文章