~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/ref/tcl/intro.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB Reference Guide: Loading Berkeley DB with Tcl</title>
8
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<a name="2"><!--meow--></a>
13
 
<table width="100%"><tr valign=top>
14
 
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Tcl API</dl></h3></td>
15
 
<td align=right><a href="../../ref/perl/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/using.html"><img src="../../images/next.gif" alt="Next"></a>
16
 
</td></tr></table>
17
 
<p>
18
 
<h1 align=center>Loading Berkeley DB with Tcl</h1>
19
 
<p>Berkeley DB includes a dynamically loadable Tcl API, which requires that
20
 
Tcl/Tk 8.1 or later already be installed on your system.  We recommend
21
 
that you install later releases of Tcl/Tk than 8.1 if possible,
22
 
especially on Windows platforms, because we found that we had to make
23
 
local fixes to the 8.1 release in a few cases.  You can download a copy
24
 
of Tcl from the <a href="http://dev.scriptics.com/">Tcl Developer
25
 
Xchange</a> Web site.
26
 
<p>This document assumes that you already configured Berkeley DB for Tcl
27
 
support, and you have built and installed everything where you want it
28
 
to be.  If you have not done so, see
29
 
<a href="../../ref/build_unix/conf.html">Configuring Berkeley DB</a> or
30
 
<a href="../../ref/build_win/intro.html">Building for Win32</a> for more
31
 
information.
32
 
<h3>Installing as a Tcl Package</h3>
33
 
<p>Once enabled, the Berkeley DB shared library for Tcl is automatically installed
34
 
as part of the standard installation process.  However, if you want to be
35
 
able to dynamically load it as a Tcl package into your script, there are
36
 
several steps that must be performed:
37
 
<p><ol>
38
 
<p><li>Run the Tcl shell in the install directory.
39
 
<li>Append this directory to your auto_path variable.
40
 
<li>Run the pkg_mkIndex proc, giving the name of the Berkeley DB Tcl library.
41
 
</ol>
42
 
<p>For example:
43
 
<p><blockquote><pre># tclsh8.3
44
 
% lappend auto_path /usr/local/BerkeleyDB.4.1/lib
45
 
% pkg_mkIndex /usr/local/BerkeleyDB.4.1/lib libdb_tcl-4.1.so</pre></blockquote>
46
 
<p>Note that your Tcl and Berkeley DB version numbers may differ from the
47
 
example, and so your tclsh and library names may be different.
48
 
<h3>Loading Berkeley DB with Tcl</h3>
49
 
<p>The Berkeley DB package may be loaded into the user's interactive Tcl script
50
 
(or wish session) via the <b>load</b> command. For example:
51
 
<p><blockquote><pre>load /usr/local/BerkeleyDB.4.1/lib/libdb_tcl-4.1.so</pre></blockquote>
52
 
<p>Note that your Berkeley DB version numbers may differ from the example, and so
53
 
the library name may be different.
54
 
<p>If you installed your library to run as a Tcl package, Tcl application
55
 
scripts should use the <b>package</b> command to indicate to the Tcl
56
 
interpreter that it needs the Berkeley DB package and where to find it. For
57
 
example:
58
 
<p><blockquote><pre>lappend auto_path "/usr/local/BerkeleyDB.4.1/lib"
59
 
package require Db_tcl</pre></blockquote>
60
 
<p>No matter which way the library gets loaded, it creates a command named
61
 
<b>berkdb</b>.  All the Berkeley DB functionality is accessed via this
62
 
command and additional commands it creates on behalf of the application.
63
 
A simple test to determine whether everything is loaded and ready is to
64
 
display the library version, as follows:
65
 
<p><blockquote><pre>berkdb version -string</pre></blockquote>
66
 
<p>This should return you the Berkeley DB version in a string format.
67
 
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/perl/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/tcl/using.html"><img src="../../images/next.gif" alt="Next"></a>
68
 
</td></tr></table>
69
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
70
 
</body>
71
 
</html>