1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
|
<?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#idp206320">Building Berkeley DB for Windows Mobile</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_wince.html#idp408408">Changing Build Configuration Type</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_wince.html#idp401736">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#idp206320">Building Berkeley DB for Windows Mobile</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_wince.html#idp408408">Changing Build Configuration Type</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="build_wince.html#idp401736">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="idp206320"></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="idp241848"></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="idp428768"></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="idp408408"></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="idp401736"></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="idp435728"></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="idp444104"></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>
|