• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/programmer_reference/
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 Programmer's Reference Guide" />
10    <link rel="up" href="build_win.html" title="Chapter��28.�� Building Berkeley DB for Windows" />
11    <link rel="prev" href="build_win_csharp.html" title="Building the C# API" />
12    <link rel="next" href="win_build_dist_dll.html" title="Distributing DLLs" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Building the Tcl API</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="build_win_csharp.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��28.��
23		Building Berkeley DB for Windows
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="win_build_dist_dll.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="build_win_tcl"></a>Building the Tcl API</h2>
35          </div>
36        </div>
37      </div>
38      <div class="toc">
39        <dl>
40          <dt>
41            <span class="sect2">
42              <a href="build_win_tcl.html#id1632455">Building Tcl with Visual C++ .NET or above</a>
43            </span>
44          </dt>
45          <dt>
46            <span class="sect2">
47              <a href="build_win_tcl.html#id1632356">Building Tcl with Visual C++ 6.0</a>
48            </span>
49          </dt>
50        </dl>
51      </div>
52      <p>Tcl support is not built automatically.  See
53<a class="xref" href="tcl.html#tcl_intro" title="Loading Berkeley DB with Tcl">Loading Berkeley DB with Tcl</a> for
54information on sites from which you can download Tcl and which Tcl
55versions are compatible with Berkeley DB.  These notes assume that Tcl is
56installed as <code class="filename">d:\tcl</code>, but you can change that if you want.</p>
57      <p>The Tcl library must be built as the same build type as the Berkeley DB
58library (both Release or both Debug).  We found that the binary
59release of Tcl can be used with the Release configuration of Berkeley DB,
60but you will need to build Tcl from sources for the Debug
61configuration.  Before building Tcl, you will need to modify its
62makefile to make sure that you are building a debug version, including
63thread support.  This is because the set of DLLs linked into the Tcl
64executable must match the corresponding set of DLLs used by Berkeley DB.</p>
65      <div class="sect2" lang="en" xml:lang="en">
66        <div class="titlepage">
67          <div>
68            <div>
69              <h3 class="title"><a id="id1632455"></a>Building Tcl with Visual C++ .NET or above</h3>
70            </div>
71          </div>
72        </div>
73        <div class="orderedlist">
74          <ol type="1">
75            <li>Set the include directories.  Choose <span class="emphasis"><em>Tools -&gt; Options
76-&gt; Projects -&gt; VC++ Directories</em></span>.  Under the "Show
77directories for" pull-down, select "Include files".  Add the full
78pathname for <code class="filename">d:\tcl\include</code>, then click OK.  This is the
79directory that contains <code class="filename">tcl.h</code>.</li>
80            <li>Set the library files directory.  Choose <span class="emphasis"><em>Tools -&gt;
81Options -&gt; Projects -&gt; VC++ Directories</em></span>.  Under the "Show
82directories for" pull-down, select "Library files".  Add the full
83pathname for the <code class="filename">d:\tcl\lib</code> directory, then click OK.
84This is the directory needed to find
85<code class="filename">tcl84g.lib</code> (or whatever the
86library is named in your distribution).</li>
87            <li>Set the build type to Release or Debug in the drop-down on the
88tool bar.</li>
89            <li>
90              <p>
91        To build, right-click on db_tcl and select Build.  This builds the Tcl
92        support library for Berkeley DB, placing the result into one of the
93        following Berkeley DB subdirectories, depending upon the
94        configuration that you chose:
95    </p>
96              <table class="simplelist" border="0" summary="Simple list">
97                <tr>
98                  <td>
99                    <code class="filename">build_windows\Win32\Debug\libdb_tcl48d.dll</code>
100                  </td>
101                </tr>
102                <tr>
103                  <td>
104                    <code class="filename">build_windows\Win32\Release\libdb_tcl48.dll</code>
105                  </td>
106                </tr>
107              </table>
108            </li>
109          </ol>
110        </div>
111        <p>If you use a version different from Tcl 8.4.x you will
112need to change the name of the Tcl library used in the build (for
113example, <code class="filename">tcl84g.lib</code>) to the
114appropriate name.  To do this, right click on <span class="emphasis"><em>db_tcl</em></span>, go to
115<span class="emphasis"><em>Properties -&gt; Linker -&gt; Input -&gt; Additional
116dependencies</em></span> and change
117<code class="filename">tcl84g.lib</code> to match the Tcl
118version you are using.</p>
119      </div>
120      <div class="sect2" lang="en" xml:lang="en">
121        <div class="titlepage">
122          <div>
123            <div>
124              <h3 class="title"><a id="id1632356"></a>Building Tcl with Visual C++ 6.0</h3>
125            </div>
126          </div>
127        </div>
128        <div class="orderedlist">
129          <ol type="1">
130            <li>Set the include directories.  Choose <span class="emphasis"><em>Tools -&gt; Options
131-&gt; Directories</em></span>.  Under the "Show directories for" pull-down,
132select "Include files".  Add the full pathname for
133<code class="filename">d:\tcl\include</code>, then click OK.  This is the directory that
134contains <code class="filename">tcl.h</code>.</li>
135            <li>Set the library files directory.  Choose <span class="emphasis"><em>Tools -&gt;
136Options -&gt; Directories</em></span>.  Under the "Show directories for"
137pull-down, select "Library files".  Add the full pathname for the
138<code class="filename">d:\tcl\lib</code> directory, then click OK.  This is the directory
139needed to find <code class="filename">tcl84g.lib</code> (or
140whatever the library is named in your distribution).</li>
141            <li>Go to <span class="emphasis"><em>Build -&gt; Set Active Configuration</em></span> and select
142either the Debug or Release version of the db_tcl project.  Then press
143OK.</li>
144            <li>
145              <p>
146        To build, select <span class="emphasis"><em>Build -&gt; Build
147            libdb_tcl48.dll</em></span>.  This builds the Tcl support
148        library for Berkeley DB, placing the result into one of the
149        following Berkeley DB subdirectories, depending upon the
150        configuration that you chose:
151    </p>
152              <table class="simplelist" border="0" summary="Simple list">
153                <tr>
154                  <td>
155                    <code class="filename">build_windows\Win32\Debug\libdb_tcl48d.dll</code>
156                  </td>
157                </tr>
158                <tr>
159                  <td>
160                    <code class="filename">build_windows\Win32\Release\libdb_tcl48.dll</code>
161                  </td>
162                </tr>
163              </table>
164            </li>
165          </ol>
166        </div>
167        <p>If you use a version different from Tcl 8.4.x you will
168need to change the name of the Tcl library used in the build (for
169example, <code class="filename">tcl84g.lib</code>) to the
170appropriate name.  To do this, choose
171<span class="emphasis"><em>Project -&gt; Settings -&gt; db_tcl</em></span>
172and change the Tcl library listed in the Object/Library modules
173<code class="filename">tcl84g.lib</code> to match the Tcl version
174you are using.</p>
175      </div>
176    </div>
177    <div class="navfooter">
178      <hr />
179      <table width="100%" summary="Navigation footer">
180        <tr>
181          <td width="40%" align="left"><a accesskey="p" href="build_win_csharp.html">Prev</a>��</td>
182          <td width="20%" align="center">
183            <a accesskey="u" href="build_win.html">Up</a>
184          </td>
185          <td width="40%" align="right">��<a accesskey="n" href="win_build_dist_dll.html">Next</a></td>
186        </tr>
187        <tr>
188          <td width="40%" align="left" valign="top">Building the C# API��</td>
189          <td width="20%" align="center">
190            <a accesskey="h" href="index.html">Home</a>
191          </td>
192          <td width="40%" align="right" valign="top">��Distributing DLLs</td>
193        </tr>
194      </table>
195    </div>
196  </body>
197</html>
198