[odb-users] support for Windows RT

Boris Kolpackov boris at codesynthesis.com
Tue Jun 25 07:58:09 EDT 2013


Hi Lidia,

Lidia Kalinovsky <lidia at lemur-soft.com> writes:

> Does ODB support Window RT ?
> If yes, can somebody share compilations instructions/tips ?

Hm, I haven't heard of anyone using ODB with Windows RT yet.

I, however, did a bit of reading and I think it should be possible
(I assume you are interested in using ODB with SQLite in a native
C++ WinRT application). In particular, I found this series of blog
posts very useful:

http://blogs.msdn.com/b/chuckw/archive/2012/09/17/dual-use-coding-techniques-for-games.aspx

ODB only uses Win32 functions for concurrency. While I believe
most of them are available for Windows Store applications, the one
set that is not is the thread creation/termination functions.

If you don't need to access an ODB database from multiple threads,
then it will probably be the easiest to just disable thread support
in ODB.

Alternatively, it should be possible to provide a WinRT-based
implementationw of the threading classes in ODB either using the
thread pool facility or the C++11 API.

But the first thing I would try is to disable threads and see if you
can build libodb and libodb-sqlite. And also SQLite. BTW, have you
tried that already?

For libodb, I would try these steps:

1a. See if you can add a new target (for Windows RT/ARM) to the
    existing VS 2012 project.

1b. If that doesn't work, then I guess we will need to create a
    new project from scratch (could be easier to make it a static
    library to start with).

2.  Edit the odb/details/config-vc.h file and change ODB_THREADS_WIN32
    to ODB_THREADS_NONE.

3.  Try to build the library and see what happens.

I couldn't try these steps myself since apparently to develop a
WinRT application you need Windows 8 (all my current VMs are Win 7).
I can try to find time and give it a shot if there is interest.

Boris



More information about the odb-users mailing list