This page contains general instructions on building Berkeley DB for Windows Embedded Compact 7 platforms using specific compilers.
The build_wince
directory in the
Berkeley DB distribution contains project files for Microsoft
Visual 2008 with the Windows Embedded Compact 7 installed:
Project File | Description |
---|---|
Berkeley_DB.sln | Visual Studio 2008 solution |
VS8\*.vcproj | Visual Studio 2008 project files |
These project files can be used to build Berkeley DB for the Windows Embedded Compact 7 platform.
build_wince
directory,
select Berkeley_DB
and click
Open
. Wait for the project conversion
to finish.
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_small62sd.lib
or against
libdb_sql62sd.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 | libdb_small62s.lib | Static Library |
db | libdb62s.lib | Static Library |
db_sql | libdb_sql62.dll | Dynamic Library |
To change a project configuration type in Visual Studio 2008, 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 2008 defaults based on the project name.
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);
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 click 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.
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).
Used within the Berkeley DB source tree, these functions are actually safe. You can safely ignore these warnings.