From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/installation/build_wince_faq.html | 185 +++++++++++++++++++++++++++------ 1 file changed, 151 insertions(+), 34 deletions(-) (limited to 'docs/installation/build_wince_faq.html') diff --git a/docs/installation/build_wince_faq.html b/docs/installation/build_wince_faq.html index e5f64528..c22b356e 100644 --- a/docs/installation/build_wince_faq.html +++ b/docs/installation/build_wince_faq.html @@ -9,12 +9,12 @@ - +
    +
  1. What if my Windows Mobile device + does not support SetFilePointer and/or + SetEndOfFile?

    + You can manually disable the truncate functionality + from the build. +

    + Do that by opening the + db-X.X.X/build_wince/db_config.h + file, and change the line that reads +

    #define HAVE_FTRUCATE 1
    + to read +
    #undef HAVE_FTRUNCATE

    + Making this change disables DB->compact() for btree + databases. +

  2. - What if my Windows Mobile device does not support SetFilePointer and/or SetEndOfFile? + Why doesn't automatic log archiving work? -

    You can manually disable the truncate functionality from the build.

    -

    Do that by opening the db-X.X.X/build_wince/db_config.h file, and change the line that reads

    -
    #define HAVE_FTRUCATE 1
    -

    to read

    -
    #undef HAVE_FTRUNCATE
    -

    Making this change disables DB->compact() for btree databases.

    +

    + The Windows Mobile platform does not have a concept + of a working directory. This means that the + DB_ARCH_REMOVE and DB_ARCH_ABS flags do not work + properly within Windows Mobile, because they rely on + having a working directory. +

    +

    + To work around this issue, you can call log_archive + with the DB_ARCH_LOG flag, the list of returned file + handles will not contain absolute paths. Your + application can take this list of files, construct + absolute paths, and delete the files. +

  3. - Why doesn't automatic log archiving work? + Does Berkeley DB support Windows Mobile? -

    The Windows Mobile platform does not have a concept of a working directory. This means that the DB_ARCH_REMOVE and DB_ARCH_ABS flags do not work properly within Windows Mobile, because they rely on having a working directory.

    -

    To work around this issue, you can call log_archive with the DB_ARCH_LOG flag, the list of returned file handles will not contain absolute paths. Your application can take this list of files, construct absolute paths, and delete the files.

    +

    + Yes. +

    +

    + Berkeley DB relies on a subset of the Windows API, + and some standard C library APIs. These are provided + by Windows CE. Windows Mobile is built "on top" of + Windows CE. +

  4. - Does Berkeley DB support Windows Mobile? + Does Berkeley DB support Windows CE?

    Yes.

    -

    Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE. Windows Mobile is built "on top" of Windows CE.

    +

    + Berkeley DB relies on a subset of the Windows API, + and some standard C library APIs. These are provided + by Windows CE. +

  5. - Does Berkeley DB support Windows CE? + Does Berkeley DB support Windows Embedded + Compact 7?

    Yes.

    -

    Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE.

    +

    + Starting from release 12.1.6.1, it is possible to build Berkeley DB + on Windows Embedded Compact 7. Below are tips for the build process: +

    +
    +
      +
    1. + + Compile error at line 146 in stdlib.h + +

      + This is a known bug for the Windows Embedded Compact 7 SDK. + A workaround is to change the line 146 in stdlib.h to read: +

      +
      __checkReturn __bcount(_Size) void * __cdecl _alloca(__in size_t 
      +_Size);
      +
    2. +
    3. + + error LNK2019: unresolved external symbol _localtime_s referenced in function _osLocaltime + +

      + This link error is caused by the fact that the Windows + Embedded Compact 7 runtime used to link Berkeley DB does not + provide the localtime_s() function. A workaround is to add +

      +
      HAVE_LOCALTIME_S=0
      +

      + to the proprocessor definitions of the db_sql project. This + can be done by right clicking the db_sql project, select + Properties->Configuration Properties->C/C++->Preprocessor->Proprocessor Definitions, + and append

      +
      HAVE_LOCALTIME_S=0
      +

      + at the end of the list. +

      +
    4. +
    5. + + error LNK1221: a subsystem can't be inferred and must be defined + +

      + This link error happens on Visual Studio 2008, because it + cannot understand the subsystem configured for Visual + Studio 2005. To fix this error, right click the project + reporting this link error, select Properties->Configuration Properties-> + Linker->System->SubSystem, and change the value to WindowsCE (/SUBSYSTEM:WINDOWSCE). +

      +
    6. +
    7. + + warning C4996: 'xxx': This function or variable may be unsafe. + +

      + Used within the Berkeley DB source tree, these functions are actually safe. + You can safely ignore these warnings. +

      +
    8. +
    +
  6. - What platforms are the supplied sample applications designed for? + What platforms are the supplied + sample applications designed for? -

    The supplied sample applications were developed for the Pocket PC 2003 emulator. They are known to work on real pocket PC devices and later versions of the emulator as well.

    -

    The supplied applications are not designed to work with Smartphone devices. The screen size and input mechanisms are not compatible.

    +

    + The supplied sample applications were developed for + the Pocket PC 2003 emulator. They are known to work on + real pocket PC devices and later versions of the + emulator as well. +

    +

    + The supplied applications are not designed to work + with Smartphone devices. The screen size and input + mechanisms are not compatible. +

  7. - I see a file mapping error when opening a Berkeley DB environment or database. What is wrong? + I see a file mapping error when + opening a Berkeley DB environment or database. What is + wrong? -

    The default behavior of Berkeley DB is to use memory mapped files in the environment. Windows Mobile does not allow memory mapped files to be created on flash storage.

    -

    There are two workarounds:

    +

    + The default behavior of Berkeley DB is to use memory + mapped files in the environment. Windows Mobile does + not allow memory mapped files to be created on flash + storage. +

    +

    + There are two workarounds: +

    1. - Configure the Berkeley DB environment not to use memory mapped files. The options are discussed in detail in - Shared memory region. -
    2. -
    3. Create the Berkeley DB environment on non-flash storage. It is possible to store database and log files in a different location to using the DB_ENV->set_data_dir() and DB_ENV->set_lg_dir() APIs.
    4. + Configure the Berkeley DB environment not + to use memory mapped files. The options are + discussed in detail in Shared memory region. + +
    5. + Create the Berkeley DB environment on + non-flash storage. It is possible to store + database and log files in a different location to + using the DB_ENV->add_data_dir() and DB_ENV->set_lg_dir() + APIs. +
  8. @@ -106,16 +224,15 @@ Up -  Next +  Next Windows Mobile notes  Home -  Chapter 7.  - Building Berkeley DB for UNIX/POSIX - +  Building for Windows + Embedded Compact 7
-- cgit v1.2.1