Table of Contents
This chapter has general instructions for building the Berkeley DB library and applets for the BREW platform.
The build_brew
directory in the Berkeley DB distribution contains
project files for Microsoft Visual C++:
Project File | Description |
---|---|
bdb_brew.dsw | Visual C++ 6.0 workspace |
bdb_brew.dsp | Visual C++ 6.0 project |
The project file can be used to build the Berkeley DB library for the BREW platform. Both BREW SDK versions 2 and 3 are supported. By default, the build is for BREW SDK version 2.
The steps for building the Berkeley DB library for the BREW Simulator are as follows:
build_brew/db_config.h
file and remove the line
"#define HAVE_BREW_SDK2". No changes are required to build for BREW SDK
version 2.The build results are placed in a subdirectory of build_brew named after
the selected configuration (for example, build_brew\Release
or
build_brew\Debug
).
When building the application during development, you should normally
use compile options "Debug Multithreaded DLL" and link against
build_brew\Debug\bdb_brew.lib
. You can also build using a
release version of the Berkeley DB libraries and tools, which will be placed
in build_brew\Release\bdb_brew.lib
. When linking against the
release build, you should compile your code with the "Release
Multithreaded DLL" compile option. You will also need to add the
build_brew
directory to the list of include directories of your
application's project, or copy the Berkeley DB include files to another
location.
Building a Berkeley DB application in the BREW environment is similar to
building in a Windows environment. Ensure that db.h
is in the
build include path and bdb_brew.lib
is in the build library
path (alternatively, you can add project dependencies to the
bdb_brew
project).
BREW applets require a few minor additions:
db.h
.BDBApp *pMe=(BDBApp *)po; if (pMe->db_global_values != NULL) FREE(pMe->db_global_values);