- Table of Contents -
-This page contains general instructions on building Berkeley DB for -Windows Mobile platforms using specific compilers.
-The build_wince directory in the Berkeley DB distribution contains
-project files for Microsoft Visual 2005 with the Mobile SDK installed:
| Project File | -Description | -
|---|---|
| Berkeley_DB.sln | -Visual Studio 2005 solution | -
| *.vcproj | -Visual Studio 2005 project files | -
These project files can be used to build Berkeley DB for the Windows Mobile platform.
-build_wince directory, select Berkeley_DB
-and click Open.The results of your build will be placed in any one of the following Berkeley DB subdirectories, -depending on the configuration that you chose: -
-
- build_wince\(Platform)\Debug
- |
-
- build_wince\(Platform)\Release
- |
-
- build_wince\(Platform)\Debug_static
- |
-
- build_wince\(Platform)\Release_static
- |
-
-
-When building your application during development, you must
-link against
-libdb_small53sd.lib or against libdb_sql53sd.lib for SQL features. You can
-also build using a release version of the Berkeley DB libraries and tools,
-which will be placed in the
-build_wince\(Platform)\Release_static directory.
-You must add the build_wince directory to the list
-of include directories of your application's project, or copy the Berkeley DB
-include files to a location in your Visual Studio include path.
-This section contains information on how to change between a dynamic -library (.dll) and static library (.lib). The library projects and their default -output and configuration in the Release build is as follows: -
-| Project | -Default Output | -Default Configuration | -
|---|---|---|
| db_small_static | -libdb_small53s.lib | -Static Library | -
| db_static | -libdb53s.lib | -Static Library | -
| db_sql | -libdb_sql53.dll | -Dynamic Library | -
| db_sql_static | -libdb_sql53s.lib | -Static Library | -
-To change a project configuration type in Visual Studio 2005, select a -project and do the following: -
-Configuration Properties.Project Defaults, change the Configuration Type to your desired type.Note: After this change, the output file names change to the Visual Studio 2005 defaults based on the project name.
-- There are many possible target CPU architectures for a Windows - Mobile application. This section outlines the process required to - add a new target architecture to the project files supplied with - Berkeley DB. -
-- The Visual Studio 2005 project files will by default build for - Pocket PC 2003 and Smartphone 2003, and Windows Mobile 6.5.3 Professional. If you want to - build for other platforms such as Windows Mobile 6.0, 6.1, or 6.5, you need to follow the steps provided in this section. -
-- Different target architectures are available in different Platform - SDK or DTK downloads from Microsoft. The appropriate SDK must be installed - for your mobile architecture before you can build for that - platform. You can find the downloads at the Microsoft Developer Center page. -
-build_wince directory,
- select Berkeley_DB and click Open.
- Solution explorer window,
- right-click the Solution Berkeley_DB and
- select Configuration manager...Active solution platform: drop
- down box select New...Type or select the new platform
- drop-down box, select a configuration from the ones
- available and click OK.Close from the
- Configuration Manager dialog box.
-
- After building for a different platform, change the deployment remote directory for the db_sql project to run the wce_sql sample application:
-
db_sql from the Solution explorer window.Configuration Properties.Deployment, change the remote directory to %CSIDL_PROGRAM_FILES%\wce_sql.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.
-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.
-Yes.
-Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE.
-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 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:
-This can be done using the following steps:
build_wince/Berkeley_DB.sln solution file.Before building the wce_tpcb sample application for the new platform, you will need to complete the following steps:
secchk.lib and crtti.lib from the Additional Dependencies field.NOTE: These steps are based on Visual Studio 2005, and might vary slightly depending on which version of Visual Studio being used.