| 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>Building the Tcl API</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="build_win.html" title="Chapter 5. Building Berkeley DB for Windows" /> |
| 11 |
<link rel="prev" href="build_win_sql.html" title="Building the SQL API" /> |
| 12 |
<link rel="next" href="win_build_dist_dll.html" title="Distributing DLLs" /> |
| 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">Building the Tcl API</th> |
| 22 |
</tr> |
| 23 |
<tr> |
| 24 |
<td width="20%" align="left"><a accesskey="p" href="build_win_sql.html">Prev</a> </td> |
| 25 |
<th width="60%" align="center">Chapter 5. |
| 26 |
Building Berkeley DB for Windows |
| 27 |
</th> |
| 28 |
<td width="20%" align="right"> <a accesskey="n" href="win_build_dist_dll.html">Next</a></td> |
| 29 |
</tr> |
| 30 |
</table> |
| 31 |
<hr /> |
| 32 |
</div> |
| 33 |
<div class="sect1" lang="en" xml:lang="en"> |
| 34 |
<div class="titlepage"> |
| 35 |
<div> |
| 36 |
<div> |
| 37 |
<h2 class="title" style="clear: both"><a id="build_win_tcl"></a>Building the Tcl API</h2> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<p>Tcl support is not built automatically. See |
| 42 |
<a href="../programmer_reference/tcl.html#tcl_intro" class="olink">Loading Berkeley DB with Tcl</a> for |
| 43 |
information on sites from which you can download Tcl and which Tcl |
| 44 |
versions are compatible with Berkeley DB. These notes assume that Tcl is |
| 45 |
installed as <code class="filename">d:\tcl</code>, but you can change that if you want.</p> |
| 46 |
<p>The Tcl library must be built as the same build type as the Berkeley DB |
| 47 |
library (both Release or both Debug). We found that the binary |
| 48 |
release of Tcl can be used with the Release configuration of Berkeley DB, |
| 49 |
but you will need to build Tcl from sources for the Debug |
| 50 |
configuration. Before building Tcl, you will need to modify its |
| 51 |
makefile to make sure that you are building a debug version, including |
| 52 |
thread support. This is because the set of DLLs linked into the Tcl |
| 53 |
executable must match the corresponding set of DLLs used by Berkeley DB.</p> |
| 54 |
<div class="orderedlist"> |
| 55 |
<ol type="1"> |
| 56 |
<li>Set the include directories. |
| 57 |
<div class="itemizedlist"><ul type="disc"><li> |
| 58 |
In Visual Studio 2005/Visual Studio 2008 - |
| 59 |
Choose <span class="emphasis"><em>Tools -> Options |
| 60 |
-> Projects -> VC++ Directories</em></span>. Under the "Show |
| 61 |
directories for" pull-down, select "Include files". Add the full |
| 62 |
pathname for <code class="filename">d:\tcl\include</code>, then click OK. |
| 63 |
</li><li> |
| 64 |
In Visual Studio 2010 - Right-click db_tcl project, choose <span class="emphasis"><em>Properties->Configuration Properties-> VC++ Directories->Include Directories</em></span>. |
| 65 |
Add the full pathnames for <code class="filename">d:\tcl\include</code>, then click OK. |
| 66 |
</li></ul></div> |
| 67 |
This is the |
| 68 |
directory that contains <code class="filename">tcl.h</code>.</li> |
| 69 |
<li>Set the library files directory. |
| 70 |
<div class="itemizedlist"><ul type="disc"><li> |
| 71 |
In Visual Studio 2005/Visual Studio 2008 - |
| 72 |
Choose <span class="emphasis"><em>Tools -> |
| 73 |
Options -> Projects -> VC++ Directories</em></span>. Under the "Show |
| 74 |
directories for" pull-down, select "Library files". Add the full |
| 75 |
pathname for the <code class="filename">d:\tcl\lib</code> directory, then click OK. |
| 76 |
</li><li> |
| 77 |
In Visual Studio 2010 - Right-click db_tcl project, choose <span class="emphasis"><em>Properties->Configuration Properties-> VC++ Directories->Library Directories</em></span>. Add the full pathname for the <code class="filename">d:\tcl\lib</code> directory, then click OK. |
| 78 |
</li></ul></div> |
| 79 |
|
| 80 |
This is the directory needed to find |
| 81 |
<code class="filename">tcl85g.lib</code> (or whatever the |
| 82 |
library is named in your distribution).</li> |
| 83 |
<li>Set the build type to Release or Debug in the drop-down on the |
| 84 |
tool bar.</li> |
| 85 |
<li> |
| 86 |
<p> |
| 87 |
To build, right-click on db_tcl and select Build. This builds the Tcl |
| 88 |
support library for Berkeley DB, placing the result into one of the |
| 89 |
following Berkeley DB subdirectories, depending upon the |
| 90 |
configuration that you chose: |
| 91 |
</p> |
| 92 |
<table class="simplelist" border="0" summary="Simple list"> |
| 93 |
<tr> |
| 94 |
<td> |
| 95 |
<code class="filename">build_windows\Win32\Debug\libdb_tcl53d.dll</code> |
| 96 |
</td> |
| 97 |
</tr> |
| 98 |
<tr> |
| 99 |
<td> |
| 100 |
<code class="filename">build_windows\Win32\Release\libdb_tcl53.dll</code> |
| 101 |
</td> |
| 102 |
</tr> |
| 103 |
</table> |
| 104 |
</li> |
| 105 |
</ol> |
| 106 |
</div> |
| 107 |
<p>If you use a version different from Tcl 8.5.x you will |
| 108 |
need to change the name of the Tcl library used in the build (for |
| 109 |
example, <code class="filename">tcl85g.lib</code>) to the |
| 110 |
appropriate name. To do this, right click on <span class="emphasis"><em>db_tcl</em></span>, go to |
| 111 |
<span class="emphasis"><em>Properties -> Linker -> Input -> Additional |
| 112 |
dependencies</em></span> and change |
| 113 |
<code class="filename">tcl85g.lib</code> to match the Tcl |
| 114 |
version you are using.</p> |
| 115 |
</div> |
| 116 |
<div class="navfooter"> |
| 117 |
<hr /> |
| 118 |
<table width="100%" summary="Navigation footer"> |
| 119 |
<tr> |
| 120 |
<td width="40%" align="left"><a accesskey="p" href="build_win_sql.html">Prev</a> </td> |
| 121 |
<td width="20%" align="center"> |
| 122 |
<a accesskey="u" href="build_win.html">Up</a> |
| 123 |
</td> |
| 124 |
<td width="40%" align="right"> <a accesskey="n" href="win_build_dist_dll.html">Next</a></td> |
| 125 |
</tr> |
| 126 |
<tr> |
| 127 |
<td width="40%" align="left" valign="top">Building the SQL API </td> |
| 128 |
<td width="20%" align="center"> |
| 129 |
<a accesskey="h" href="index.html">Home</a> |
| 130 |
</td> |
| 131 |
<td width="40%" align="right" valign="top"> Distributing DLLs</td> |
| 132 |
</tr> |
| 133 |
</table> |
| 134 |
</div> |
| 135 |
</body> |
| 136 |
</html> |