| 1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 |
<title>Chapter 6. Building Berkeley DB for Windows Mobile</title> |
| 7 |
<link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 |
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 |
<link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" /> |
| 10 |
<link rel="up" href="index.html" title="Berkeley DB Installation and Build Guide" /> |
| 11 |
<link rel="prev" href="build_win_faq.html" title="Windows FAQ" /> |
| 12 |
<link rel="next" href="build_wince_notes.html" title="Windows Mobile notes" /> |
| 13 |
</head> |
| 14 |
<body> |
| 15 |
<div xmlns="" class="navheader"> |
| 16 |
<div class="libver"> |
| 17 |
<p>Library Version 11.2.5.3</p> |
| 18 |
</div> |
| 19 |
<table width="100%" summary="Navigation header"> |
| 20 |
<tr> |
| 21 |
<th colspan="3" align="center">Chapter 6. |
| 22 |
Building Berkeley DB for Windows Mobile |
| 23 |
</th> |
| 24 |
</tr> |
| 25 |
<tr> |
| 26 |
<td width="20%" align="left"><a accesskey="p" href="build_win_faq.html">Prev</a> </td> |
| 27 |
<th width="60%" align="center"> </th> |
| 28 |
<td width="20%" align="right"> <a accesskey="n" href="build_wince_notes.html">Next</a></td> |
| 29 |
</tr> |
| 30 |
</table> |
| 31 |
<hr /> |
| 32 |
</div> |
| 33 |
<div class="chapter" lang="en" xml:lang="en"> |
| 34 |
<div class="titlepage"> |
| 35 |
<div> |
| 36 |
<div> |
| 37 |
<h2 class="title"><a id="build_wince"></a>Chapter 6. |
| 38 |
Building Berkeley DB for Windows Mobile |
| 39 |
</h2> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
<div class="toc"> |
| 44 |
<p> |
| 45 |
<b>Table of Contents</b> |
| 46 |
</p> |
| 47 |
<dl> |
| 48 |
<dt> |
| 49 |
<span class="sect1"> |
| 50 |
<a href="build_wince.html#build_wince_intro">Building for Windows Mobile</a> |
| 51 |
</span> |
| 52 |
</dt> |
| 53 |
<dd> |
| 54 |
<dl> |
| 55 |
<dt> |
| 56 |
<span class="sect2"> |
| 57 |
<a href="build_wince.html#idp206320">Building Berkeley DB for Windows Mobile</a> |
| 58 |
</span> |
| 59 |
</dt> |
| 60 |
<dt> |
| 61 |
<span class="sect2"> |
| 62 |
<a href="build_wince.html#idp408408">Changing Build Configuration Type</a> |
| 63 |
</span> |
| 64 |
</dt> |
| 65 |
<dt> |
| 66 |
<span class="sect2"> |
| 67 |
<a href="build_wince.html#idp401736">Building Berkeley DB for different target platforms</a> |
| 68 |
</span> |
| 69 |
</dt> |
| 70 |
</dl> |
| 71 |
</dd> |
| 72 |
<dt> |
| 73 |
<span class="sect1"> |
| 74 |
<a href="build_wince_notes.html">Windows Mobile notes</a> |
| 75 |
</span> |
| 76 |
</dt> |
| 77 |
<dt> |
| 78 |
<span class="sect1"> |
| 79 |
<a href="build_wince_faq.html">Windows Mobile FAQ</a> |
| 80 |
</span> |
| 81 |
</dt> |
| 82 |
</dl> |
| 83 |
</div> |
| 84 |
<div class="sect1" lang="en" xml:lang="en"> |
| 85 |
<div class="titlepage"> |
| 86 |
<div> |
| 87 |
<div> |
| 88 |
<h2 class="title" style="clear: both"><a id="build_wince_intro"></a>Building for Windows Mobile</h2> |
| 89 |
</div> |
| 90 |
</div> |
| 91 |
</div> |
| 92 |
<div class="toc"> |
| 93 |
<dl> |
| 94 |
<dt> |
| 95 |
<span class="sect2"> |
| 96 |
<a href="build_wince.html#idp206320">Building Berkeley DB for Windows Mobile</a> |
| 97 |
</span> |
| 98 |
</dt> |
| 99 |
<dt> |
| 100 |
<span class="sect2"> |
| 101 |
<a href="build_wince.html#idp408408">Changing Build Configuration Type</a> |
| 102 |
</span> |
| 103 |
</dt> |
| 104 |
<dt> |
| 105 |
<span class="sect2"> |
| 106 |
<a href="build_wince.html#idp401736">Building Berkeley DB for different target platforms</a> |
| 107 |
</span> |
| 108 |
</dt> |
| 109 |
</dl> |
| 110 |
</div> |
| 111 |
<p>This page contains general instructions on building Berkeley DB for |
| 112 |
Windows Mobile platforms using specific compilers.</p> |
| 113 |
<p>The <code class="filename">build_wince</code> directory in the Berkeley DB distribution contains |
| 114 |
project files for Microsoft Visual 2005 with the Mobile SDK installed:</p> |
| 115 |
<div class="informaltable"> |
| 116 |
<table border="1" width="80%"> |
| 117 |
<colgroup> |
| 118 |
<col /> |
| 119 |
<col /> |
| 120 |
</colgroup> |
| 121 |
<thead> |
| 122 |
<tr> |
| 123 |
<th align="center">Project File</th> |
| 124 |
<th align="center">Description</th> |
| 125 |
</tr> |
| 126 |
</thead> |
| 127 |
<tbody> |
| 128 |
<tr> |
| 129 |
<td align="center">Berkeley_DB.sln</td> |
| 130 |
<td align="center">Visual Studio 2005 solution</td> |
| 131 |
</tr> |
| 132 |
<tr> |
| 133 |
<td align="center">*.vcproj</td> |
| 134 |
<td align="center">Visual Studio 2005 project files</td> |
| 135 |
</tr> |
| 136 |
</tbody> |
| 137 |
</table> |
| 138 |
</div> |
| 139 |
<p>These project files can be used to build Berkeley DB for the Windows Mobile platform.</p> |
| 140 |
<div class="sect2" lang="en" xml:lang="en"> |
| 141 |
<div class="titlepage"> |
| 142 |
<div> |
| 143 |
<div> |
| 144 |
<h3 class="title"><a id="idp206320"></a>Building Berkeley DB for Windows Mobile</h3> |
| 145 |
</div> |
| 146 |
</div> |
| 147 |
</div> |
| 148 |
<div class="sect3" lang="en" xml:lang="en"> |
| 149 |
<div class="titlepage"> |
| 150 |
<div> |
| 151 |
<div> |
| 152 |
<h4 class="title"><a id="idp241848"></a>Visual Studio 2005</h4> |
| 153 |
</div> |
| 154 |
</div> |
| 155 |
</div> |
| 156 |
<div class="orderedlist"> |
| 157 |
<ol type="1"> |
| 158 |
<li>Choose <span class="emphasis"><em>File -> Open Workspace...</em></span>. |
| 159 |
Navigate to the <code class="filename">build_wince</code> directory, select <code class="filename">Berkeley_DB</code> |
| 160 |
and click <code class="literal">Open</code>.</li> |
| 161 |
<li>Select the desired target platform from the platform drop-down menu.</li> |
| 162 |
<li>Build the desired projects.</li> |
| 163 |
</ol> |
| 164 |
</div> |
| 165 |
</div> |
| 166 |
<div class="sect3" lang="en" xml:lang="en"> |
| 167 |
<div class="titlepage"> |
| 168 |
<div> |
| 169 |
<div> |
| 170 |
<h4 class="title"><a id="idp428768"></a>Build results</h4> |
| 171 |
</div> |
| 172 |
</div> |
| 173 |
</div> |
| 174 |
<p>The results of your build will be placed in any one of the following Berkeley DB subdirectories, |
| 175 |
depending on the configuration that you chose: |
| 176 |
</p> |
| 177 |
<table class="simplelist" border="0" summary="Simple list"> |
| 178 |
<tr> |
| 179 |
<td> |
| 180 |
<code class="filename">build_wince\(Platform)\Debug</code> |
| 181 |
</td> |
| 182 |
</tr> |
| 183 |
<tr> |
| 184 |
<td> |
| 185 |
<code class="filename">build_wince\(Platform)\Release</code> |
| 186 |
</td> |
| 187 |
</tr> |
| 188 |
<tr> |
| 189 |
<td> |
| 190 |
<code class="filename">build_wince\(Platform)\Debug_static</code> |
| 191 |
</td> |
| 192 |
</tr> |
| 193 |
<tr> |
| 194 |
<td> |
| 195 |
<code class="filename">build_wince\(Platform)\Release_static</code> |
| 196 |
</td> |
| 197 |
</tr> |
| 198 |
</table> |
| 199 |
<p> |
| 200 |
</p> |
| 201 |
<p>When building your application during development, you must |
| 202 |
link against |
| 203 |
<code class="filename">libdb_small53sd.lib</code> or against <code class="filename">libdb_sql53sd.lib</code> for SQL features. You can |
| 204 |
also build using a release version of the Berkeley DB libraries and tools, |
| 205 |
which will be placed in the |
| 206 |
<code class="filename">build_wince\(Platform)\Release_static </code>directory. |
| 207 |
You must add the <code class="filename">build_wince</code> directory to the list |
| 208 |
of include directories of your application's project, or copy the Berkeley DB |
| 209 |
include files to a location in your Visual Studio include path.</p> |
| 210 |
</div> |
| 211 |
</div> |
| 212 |
<div class="sect2" lang="en" xml:lang="en"> |
| 213 |
<div class="titlepage"> |
| 214 |
<div> |
| 215 |
<div> |
| 216 |
<h3 class="title"><a id="idp408408"></a>Changing Build Configuration Type</h3> |
| 217 |
</div> |
| 218 |
</div> |
| 219 |
</div> |
| 220 |
<p> |
| 221 |
This section contains information on how to change between a dynamic |
| 222 |
library (.dll) and static library (.lib). The library projects and their default |
| 223 |
output and configuration in the Release build is as follows: |
| 224 |
</p> |
| 225 |
<div class="informaltable"> |
| 226 |
<table border="1" width="80%"> |
| 227 |
<colgroup> |
| 228 |
<col /> |
| 229 |
<col /> |
| 230 |
<col /> |
| 231 |
</colgroup> |
| 232 |
<thead> |
| 233 |
<tr> |
| 234 |
<th align="center">Project</th> |
| 235 |
<th align="center">Default Output</th> |
| 236 |
<th align="center">Default Configuration</th> |
| 237 |
</tr> |
| 238 |
</thead> |
| 239 |
<tbody> |
| 240 |
<tr> |
| 241 |
<td align="center">db_small_static</td> |
| 242 |
<td align="center">libdb_small53s.lib</td> |
| 243 |
<td align="center">Static Library</td> |
| 244 |
</tr> |
| 245 |
<tr> |
| 246 |
<td align="center">db_static</td> |
| 247 |
<td align="center">libdb53s.lib</td> |
| 248 |
<td align="center">Static Library</td> |
| 249 |
</tr> |
| 250 |
<tr> |
| 251 |
<td align="center">db_sql</td> |
| 252 |
<td align="center">libdb_sql53.dll</td> |
| 253 |
<td align="center">Dynamic Library</td> |
| 254 |
</tr> |
| 255 |
<tr> |
| 256 |
<td align="center">db_sql_static</td> |
| 257 |
<td align="center">libdb_sql53s.lib</td> |
| 258 |
<td align="center">Static Library</td> |
| 259 |
</tr> |
| 260 |
</tbody> |
| 261 |
</table> |
| 262 |
</div> |
| 263 |
<p> |
| 264 |
To change a project configuration type in Visual Studio 2005, select a |
| 265 |
project and do the following: |
| 266 |
</p> |
| 267 |
<div class="orderedlist"> |
| 268 |
<ol type="1"> |
| 269 |
<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> |
| 270 |
<li>Under <code class="literal">Project Defaults</code>, change the <code class="literal">Configuration Type</code> to your desired type.</li> |
| 271 |
</ol> |
| 272 |
</div> |
| 273 |
<p>Note: After this change, the output file names change to the Visual Studio 2005 defaults based on the project name.</p> |
| 274 |
</div> |
| 275 |
<div class="sect2" lang="en" xml:lang="en"> |
| 276 |
<div class="titlepage"> |
| 277 |
<div> |
| 278 |
<div> |
| 279 |
<h3 class="title"><a id="idp401736"></a>Building Berkeley DB for different target platforms</h3> |
| 280 |
</div> |
| 281 |
</div> |
| 282 |
</div> |
| 283 |
<p> |
| 284 |
There are many possible target CPU architectures for a Windows |
| 285 |
Mobile application. This section outlines the process required to |
| 286 |
add a new target architecture to the project files supplied with |
| 287 |
Berkeley DB. |
| 288 |
</p> |
| 289 |
<p> |
| 290 |
The Visual Studio 2005 project files will by default build for |
| 291 |
Pocket PC 2003 and Smartphone 2003, and Windows Mobile 6.5.3 Professional. If you want to |
| 292 |
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. |
| 293 |
</p> |
| 294 |
<p> |
| 295 |
Different target architectures are available in different Platform |
| 296 |
SDK or DTK downloads from Microsoft. The appropriate SDK must be installed |
| 297 |
for your mobile architecture before you can build for that |
| 298 |
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. |
| 299 |
</p> |
| 300 |
<div class="sect3" lang="en" xml:lang="en"> |
| 301 |
<div class="titlepage"> |
| 302 |
<div> |
| 303 |
<div> |
| 304 |
<h4 class="title"><a id="idp435728"></a>Visual Studio 2005</h4> |
| 305 |
</div> |
| 306 |
</div> |
| 307 |
</div> |
| 308 |
<div class="orderedlist"> |
| 309 |
<ol type="1"> |
| 310 |
<li> |
| 311 |
Choose <span class="emphasis"><em>File -> Open Workspace...</em></span>. |
| 312 |
Navigate to the <code class="filename">build_wince</code> directory, |
| 313 |
select <code class="filename">Berkeley_DB</code> and click Open. |
| 314 |
</li> |
| 315 |
<li> |
| 316 |
From the <code class="literal">Solution explorer</code> window, |
| 317 |
right-click the <code class="literal">Solution Berkeley_DB</code> and |
| 318 |
select <code class="literal">Configuration manager...</code></li> |
| 319 |
<li> |
| 320 |
In the <code class="literal">Active solution platform:</code> drop |
| 321 |
down box select <code class="literal">New...</code></li> |
| 322 |
<li> |
| 323 |
From the <code class="literal">Type or select the new platform</code> |
| 324 |
drop-down box, select a configuration from the ones |
| 325 |
available and click <code class="literal">OK.</code></li> |
| 326 |
<li> |
| 327 |
Click <code class="literal">Close</code> from the |
| 328 |
<code class="literal">Configuration Manager</code> dialog box. |
| 329 |
</li> |
| 330 |
<li> |
| 331 |
The target platform drop-down now contains the platform |
| 332 |
just added. |
| 333 |
</li> |
| 334 |
<li> |
| 335 |
Build as per the instructions given at the beginning of this chapter. |
| 336 |
</li> |
| 337 |
</ol> |
| 338 |
</div> |
| 339 |
</div> |
| 340 |
<div class="sect3" lang="en" xml:lang="en"> |
| 341 |
<div class="titlepage"> |
| 342 |
<div> |
| 343 |
<div> |
| 344 |
<h4 class="title"><a id="idp444104"></a>BDB SQL Notes</h4> |
| 345 |
</div> |
| 346 |
</div> |
| 347 |
</div> |
| 348 |
<p> |
| 349 |
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: |
| 350 |
</p> |
| 351 |
<div class="orderedlist"> |
| 352 |
<ol type="1"> |
| 353 |
<li>Select <code class="literal">db_sql</code> from the <code class="literal">Solution explorer</code> window.</li> |
| 354 |
<li>Choose <span class="emphasis"><em>Project->Properties</em></span> and navigate to <code class="literal">Configuration Properties</code>.</li> |
| 355 |
<li>Under <code class="literal">Deployment</code>, change the remote directory to <code class="literal">%CSIDL_PROGRAM_FILES%\wce_sql</code>.</li> |
| 356 |
</ol> |
| 357 |
</div> |
| 358 |
</div> |
| 359 |
</div> |
| 360 |
</div> |
| 361 |
</div> |
| 362 |
<div class="navfooter"> |
| 363 |
<hr /> |
| 364 |
<table width="100%" summary="Navigation footer"> |
| 365 |
<tr> |
| 366 |
<td width="40%" align="left"><a accesskey="p" href="build_win_faq.html">Prev</a> </td> |
| 367 |
<td width="20%" align="center"> </td> |
| 368 |
<td width="40%" align="right"> <a accesskey="n" href="build_wince_notes.html">Next</a></td> |
| 369 |
</tr> |
| 370 |
<tr> |
| 371 |
<td width="40%" align="left" valign="top">Windows FAQ </td> |
| 372 |
<td width="20%" align="center"> |
| 373 |
<a accesskey="h" href="index.html">Home</a> |
| 374 |
</td> |
| 375 |
<td width="40%" align="right" valign="top"> Windows Mobile notes</td> |
| 376 |
</tr> |
| 377 |
</table> |
| 378 |
</div> |
| 379 |
</body> |
| 380 |
</html> |