###

Berkeley DB Reference Guide:
  Building Berkeley DB for Windows CE systems

### Building for Windows CE

This page contains general instructions on building Berkeley DB for Windows CE platforms using specific compilers. The Windows CE FAQ also contains helpful information.

The build_wince directory in the Berkeley DB distribution contains project files for Microsoft eMbedded Visual C++:

Project File | Description
--- | ---
Berkeley_DB.vcw | eMbedded Visual C++ 4.0 workspace
*.vcp | eMbedded Visual C++ 4.0 projects

These project files can be used to build Berkeley DB for the Windows CE platform.

### Building Berkeley DB for Windows CE

#### eMbedded Visual C++ 4.0

1. Choose File -> Open Workspace.... Navigate to the build_wince directory, select Berkeley_DB and click Open.

2. Choose the project configuration from the Build -> Set Active Configuration... drop-down menu on the tool bar. The correct target will usually db_small - Win32 (WCE emulator) Debug or Release.

3. To build, press F7, or select Build from the drop-down menu on the tool bar.

#### Build results

The results of your build will be placed in a subdirectory of build_windows named after the configuration you chose (for examples, build_wince\Release or build_wince\Debug).

When building your application during development, you should normally link against build_wince\Debug\libdb_small46sd.lib. You can also build using a release version of the Berkeley DB libraries and tools, which will be placed in build_windows\Release\libdb_small46s.lib. You will also need to 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.

### Building Berkeley DB for different target CPU architectures

There are many possible target CPU architectures for a Windows CE application. This section outlines the process required to add a new target architecture to the project files supplied with Berkeley DB.

#### eMbedded Visual C++ 4.0

1. Choose File -> Open Workspace.... Navigate to the build_wince directory, select Berkeley_DB and click Open.

2. Choose the Build -> Configurations... menu item.

3. Click the Add... button.

4. Select the desired CPU architecture from the first dropdown box. Select an existing target to copy the settings from (The corresponding emulator target is a good choice). Configuration should be either Debug or Release. Click OK.

5. Choose the Build -> Set Active Configuration... menu item. Choose the new target then click OK.

6. Select the Project -> Settings... menu item. Under the C/C++ tab, select the Preprocessor Category. In the Additional include directories: field add: ".,.." without the quotes. Click OK.

7. Build as per the instructions in Building Berkeley DB for Windows CE above.

Copyright (c) 1996,2007 Oracle. All rights reserved.