mirror of
https://github.com/berkeleydb/libdb.git
synced 2024-11-16 09:06:25 +00:00
380 lines
15 KiB
HTML
380 lines
15 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||
<title>Chapter 6. Building Berkeley DB for Windows Mobile</title>
|
||
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
|
||
<link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
|
||
<link rel="up" href="index.html" title="Berkeley DB Installation and Build Guide" />
|
||
<link rel="prev" href="build_win_faq.html" title="Windows FAQ" />
|
||
<link rel="next" href="build_wince_notes.html" title="Windows Mobile notes" />
|
||
</head>
|
||
<body>
|
||
<div xmlns="" class="navheader">
|
||
<div class="libver">
|
||
<p>Library Version 11.2.5.3</p>
|
||
</div>
|
||
<table width="100%" summary="Navigation header">
|
||
<tr>
|
||
<th colspan="3" align="center">Chapter 6.
|
||
Building Berkeley DB for Windows Mobile
|
||
</th>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" align="left"><a accesskey="p" href="build_win_faq.html">Prev</a> </td>
|
||
<th width="60%" align="center"> </th>
|
||
<td width="20%" align="right"> <a accesskey="n" href="build_wince_notes.html">Next</a></td>
|
||
</tr>
|
||
</table>
|
||
<hr />
|
||
</div>
|
||
<div class="chapter" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h2 class="title"><a id="build_wince"></a>Chapter 6.
|
||
Building Berkeley DB for Windows Mobile
|
||
</h2>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="toc">
|
||
<p>
|
||
<b>Table of Contents</b>
|
||
</p>
|
||
<dl>
|
||
<dt>
|
||
<span class="sect1">
|
||
<a href="build_wince.html#build_wince_intro">Building for Windows Mobile</a>
|
||
</span>
|
||
</dt>
|
||
<dd>
|
||
<dl>
|
||
<dt>
|
||
<span class="sect2">
|
||
<a href="build_wince.html#idm516512">Building Berkeley DB for Windows Mobile</a>
|
||
</span>
|
||
</dt>
|
||
<dt>
|
||
<span class="sect2">
|
||
<a href="build_wince.html#idp180744">Changing Build Configuration Type</a>
|
||
</span>
|
||
</dt>
|
||
<dt>
|
||
<span class="sect2">
|
||
<a href="build_wince.html#idp156256">Building Berkeley DB for different target platforms</a>
|
||
</span>
|
||
</dt>
|
||
</dl>
|
||
</dd>
|
||
<dt>
|
||
<span class="sect1">
|
||
<a href="build_wince_notes.html">Windows Mobile notes</a>
|
||
</span>
|
||
</dt>
|
||
<dt>
|
||
<span class="sect1">
|
||
<a href="build_wince_faq.html">Windows Mobile FAQ</a>
|
||
</span>
|
||
</dt>
|
||
</dl>
|
||
</div>
|
||
<div class="sect1" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h2 class="title" style="clear: both"><a id="build_wince_intro"></a>Building for Windows Mobile</h2>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="toc">
|
||
<dl>
|
||
<dt>
|
||
<span class="sect2">
|
||
<a href="build_wince.html#idm516512">Building Berkeley DB for Windows Mobile</a>
|
||
</span>
|
||
</dt>
|
||
<dt>
|
||
<span class="sect2">
|
||
<a href="build_wince.html#idp180744">Changing Build Configuration Type</a>
|
||
</span>
|
||
</dt>
|
||
<dt>
|
||
<span class="sect2">
|
||
<a href="build_wince.html#idp156256">Building Berkeley DB for different target platforms</a>
|
||
</span>
|
||
</dt>
|
||
</dl>
|
||
</div>
|
||
<p>This page contains general instructions on building Berkeley DB for
|
||
Windows Mobile platforms using specific compilers.</p>
|
||
<p>The <code class="filename">build_wince</code> directory in the Berkeley DB distribution contains
|
||
project files for Microsoft Visual 2005 with the Mobile SDK installed:</p>
|
||
<div class="informaltable">
|
||
<table border="1" width="80%">
|
||
<colgroup>
|
||
<col />
|
||
<col />
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th align="center">Project File</th>
|
||
<th align="center">Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td align="center">Berkeley_DB.sln</td>
|
||
<td align="center">Visual Studio 2005 solution</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">*.vcproj</td>
|
||
<td align="center">Visual Studio 2005 project files</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p>These project files can be used to build Berkeley DB for the Windows Mobile platform.</p>
|
||
<div class="sect2" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h3 class="title"><a id="idm516512"></a>Building Berkeley DB for Windows Mobile</h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sect3" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h4 class="title"><a id="idp144872"></a>Visual Studio 2005</h4>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="orderedlist">
|
||
<ol type="1">
|
||
<li>Choose <span class="emphasis"><em>File -> Open Workspace...</em></span>.
|
||
Navigate to the <code class="filename">build_wince</code> directory, select <code class="filename">Berkeley_DB</code>
|
||
and click <code class="literal">Open</code>.</li>
|
||
<li>Select the desired target platform from the platform drop-down menu.</li>
|
||
<li>Build the desired projects.</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
<div class="sect3" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h4 class="title"><a id="idp184624"></a>Build results</h4>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>The results of your build will be placed in any one of the following Berkeley DB subdirectories,
|
||
depending on the configuration that you chose:
|
||
</p>
|
||
<table class="simplelist" border="0" summary="Simple list">
|
||
<tr>
|
||
<td>
|
||
<code class="filename">build_wince\(Platform)\Debug</code>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code class="filename">build_wince\(Platform)\Release</code>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code class="filename">build_wince\(Platform)\Debug_static</code>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code class="filename">build_wince\(Platform)\Release_static</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<p>
|
||
</p>
|
||
<p>When building your application during development, you must
|
||
link against
|
||
<code class="filename">libdb_small53sd.lib</code> or against <code class="filename">libdb_sql53sd.lib</code> for SQL features. You can
|
||
also build using a release version of the Berkeley DB libraries and tools,
|
||
which will be placed in the
|
||
<code class="filename">build_wince\(Platform)\Release_static </code>directory.
|
||
You must add the <code class="filename">build_wince</code> 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.</p>
|
||
</div>
|
||
</div>
|
||
<div class="sect2" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h3 class="title"><a id="idp180744"></a>Changing Build Configuration Type</h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>
|
||
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:
|
||
</p>
|
||
<div class="informaltable">
|
||
<table border="1" width="80%">
|
||
<colgroup>
|
||
<col />
|
||
<col />
|
||
<col />
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th align="center">Project</th>
|
||
<th align="center">Default Output</th>
|
||
<th align="center">Default Configuration</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td align="center">db_small_static</td>
|
||
<td align="center">libdb_small53s.lib</td>
|
||
<td align="center">Static Library</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">db_static</td>
|
||
<td align="center">libdb53s.lib</td>
|
||
<td align="center">Static Library</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">db_sql</td>
|
||
<td align="center">libdb_sql53.dll</td>
|
||
<td align="center">Dynamic Library</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">db_sql_static</td>
|
||
<td align="center">libdb_sql53s.lib</td>
|
||
<td align="center">Static Library</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p>
|
||
To change a project configuration type in Visual Studio 2005, select a
|
||
project and do the following:
|
||
</p>
|
||
<div class="orderedlist">
|
||
<ol type="1">
|
||
<li>Choose <span class="emphasis"><em>Project</em></span>-><span class="emphasis"><em>Properties</em></span> and navigate to <code class="literal">Configuration Properties.</code></li>
|
||
<li>Under <code class="literal">Project Defaults</code>, change the <code class="literal">Configuration Type</code> to your desired type.</li>
|
||
</ol>
|
||
</div>
|
||
<p>Note: After this change, the output file names change to the Visual Studio 2005 defaults based on the project name.</p>
|
||
</div>
|
||
<div class="sect2" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h3 class="title"><a id="idp156256"></a>Building Berkeley DB for different target platforms</h3>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>
|
||
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.
|
||
</p>
|
||
<p>
|
||
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.
|
||
</p>
|
||
<p>
|
||
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 <a class="ulink" href=" http://msdn.microsoft.com/en-us/windowsmobile/default.aspx" target="_top">Microsoft Developer Center</a> page.
|
||
</p>
|
||
<div class="sect3" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h4 class="title"><a id="idp191952"></a>Visual Studio 2005</h4>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="orderedlist">
|
||
<ol type="1">
|
||
<li>
|
||
Choose <span class="emphasis"><em>File -> Open Workspace...</em></span>.
|
||
Navigate to the <code class="filename">build_wince</code> directory,
|
||
select <code class="filename">Berkeley_DB</code> and click Open.
|
||
</li>
|
||
<li>
|
||
From the <code class="literal">Solution explorer</code> window,
|
||
right-click the <code class="literal">Solution Berkeley_DB</code> and
|
||
select <code class="literal">Configuration manager...</code></li>
|
||
<li>
|
||
In the <code class="literal">Active solution platform:</code> drop
|
||
down box select <code class="literal">New...</code></li>
|
||
<li>
|
||
From the <code class="literal">Type or select the new platform</code>
|
||
drop-down box, select a configuration from the ones
|
||
available and click <code class="literal">OK.</code></li>
|
||
<li>
|
||
Click <code class="literal">Close</code> from the
|
||
<code class="literal">Configuration Manager</code> dialog box.
|
||
</li>
|
||
<li>
|
||
The target platform drop-down now contains the platform
|
||
just added.
|
||
</li>
|
||
<li>
|
||
Build as per the instructions given at the beginning of this chapter.
|
||
</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
<div class="sect3" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h4 class="title"><a id="idp198816"></a>BDB SQL Notes</h4>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>
|
||
After building for a different platform, change the deployment remote directory for the <code class="literal">db_sql</code> project to run the <code class="literal">wce_sql</code> sample application:
|
||
</p>
|
||
<div class="orderedlist">
|
||
<ol type="1">
|
||
<li>Select <code class="literal">db_sql</code> from the <code class="literal">Solution explorer</code> window.</li>
|
||
<li>Choose <span class="emphasis"><em>Project->Properties</em></span> and navigate to <code class="literal">Configuration Properties</code>.</li>
|
||
<li>Under <code class="literal">Deployment</code>, change the remote directory to <code class="literal">%CSIDL_PROGRAM_FILES%\wce_sql</code>.</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="navfooter">
|
||
<hr />
|
||
<table width="100%" summary="Navigation footer">
|
||
<tr>
|
||
<td width="40%" align="left"><a accesskey="p" href="build_win_faq.html">Prev</a> </td>
|
||
<td width="20%" align="center"> </td>
|
||
<td width="40%" align="right"> <a accesskey="n" href="build_wince_notes.html">Next</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="40%" align="left" valign="top">Windows FAQ </td>
|
||
<td width="20%" align="center">
|
||
<a accesskey="h" href="index.html">Home</a>
|
||
</td>
|
||
<td width="40%" align="right" valign="top"> Windows Mobile notes</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</body>
|
||
</html>
|