mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
144 lines
8.3 KiB
HTML
144 lines
8.3 KiB
HTML
<!--"@(#)intro.so 10.26 (Sleepycat) 11/18/99"-->
|
|
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
|
|
<!--All rights reserved.-->
|
|
<html>
|
|
<head>
|
|
<title>Berkeley DB Reference Guide: Building for Win32</title>
|
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
|
|
</head>
|
|
<body bgcolor=white>
|
|
<a name="2"><!--meow--></a>
|
|
<table><tr valign=top>
|
|
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for Win32 platforms</dl></h3></td>
|
|
<td width="1%"><a href="../../ref/build_unix/ultrix.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/build_win/test.html"><img src="../../images/next.gif" alt="Next"></a>
|
|
</td></tr></table>
|
|
<p>
|
|
<h1 align=center>Building for Win32</h1>
|
|
<p>The build_win32 directory in the Berkeley DB distribution contains project files
|
|
for both MSVC 5.0 and 6.0:
|
|
<p><table border=1 align=center>
|
|
<tr><th>Project File</th><th>Description</th></tr>
|
|
<tr> <td align=center>Berkeley_DB.dsw</td> <td align=center>Visual C++ 5.0 project (compatible with 6.0)</td> </tr>
|
|
<tr> <td align=center>*.dsp</td> <td align=center>Visual C++ 5.0 subprojects (compatible with 6.0
|
|
)</td> </tr>
|
|
</table>
|
|
<p>These project files can be used to build Berkeley DB for any Win32 platform:
|
|
Windows 2000, Windows NT, Windows 98 and Windows 95.
|
|
<h3>Building With Visual C++ 6.0</h3>
|
|
<p>Open the file <b>Berkeley_DB.dsw</b>. You will be told that the project
|
|
was generated by a previous version of Developer Studio, and asked if you
|
|
want to convert the project. Select Yes, and all projects will be
|
|
converted. Then continue on with the instructions for building with
|
|
Visual C++ 5.0.
|
|
<p>Note that when you build a release version, you may receive a warning
|
|
about an unknown compiler option <i>/Ob2</i>. This is apparently a
|
|
flaw in the project conversion for Visual C++ and can be ignored.
|
|
<p>Each release of Berkeley DB is built and tested with this procedure using
|
|
Microsoft Visual C++ 6.0, Standard Edition.
|
|
<h3>Building With Visual C++ 5.0</h3>
|
|
<p>Open the file <b>Berkeley_DB.dsw</b>. This workspace includes a number
|
|
of subprojects needed to build Berkeley DB.
|
|
<p>First, you'll need to set the include directories. To do this, select
|
|
<i>Options...</i> from the <i>Tools</i> pull-down menu. At this
|
|
point, a tabbed dialogue should appear. In this new window, choose the
|
|
<i>Directories</i> tab. For the <i>Platform</i>, select
|
|
<i>Win32</i> and for <i>Show directories for</i> select
|
|
<i>Include files</i>. Below these options in the list of directories,
|
|
you should add two directories: the full pathname of the
|
|
<i>build_win32</i> subdirectory of Berkeley DB, followed by the full
|
|
pathname of the <i>include</i> subdirectory of Berkeley DB. Then click OK.
|
|
<p>Then, select <i>Active Project Configuration</i> under the
|
|
<i>Build</i> pull-down menu. For a debug version of the libraries,
|
|
tools and examples, select <i>db_buildall - Win32 Debug</i>.
|
|
Results from this build are put into <b>build_win32/Debug</b>.
|
|
For a release version, select <i>db_buildall - Win32 Release</i>;
|
|
results are put into <b>build_win32/Release</b>.
|
|
For a debug version that has all tools and examples built with
|
|
static libraries, select <i>db_buildall - Win32 Debug Static</i>;
|
|
results are put into <b>build_win32/Debug_static</b>.
|
|
For a release version of the same,
|
|
select <i>db_buildall - Win32 Release Static</i>;
|
|
results are put into <b>build_win32/Release_static</b>.
|
|
Finally, to build, select <i>Build db_buildall.exe</i> under the
|
|
<i>Build</i> pull-down menu.
|
|
<p>When building your application, you should normally use compile options
|
|
"debug multithreaded dll" and link against
|
|
<b>build_win32/Debug/libdb32d.lib</b>. If you want
|
|
to link against a static (non-DLL) version of the library, use the
|
|
"debug multithreaded" compile options and link against
|
|
<b>build_win32/Debug_static/libdb32sd.lib</b>. You can
|
|
also build using a release version of the libraries and tools, which will be
|
|
placed in <b>build_win32/Release/libdb32.lib</b>.
|
|
The static version will be in
|
|
<b>build_win32/Release_static/libdb32s.lib</b>.
|
|
<p>Each release of Berkeley DB is maintained, built and tested using Microsoft
|
|
Visual C++ 5.0 and 6.0.
|
|
<h3>Including the C++ API</h3>
|
|
<p>C++ support is built automatically on Win32.
|
|
<h3>Including the Java API</h3>
|
|
<p>Java support is not built automatically. The following instructions
|
|
assume you have installed the Sun Java Development Kit in
|
|
<b>d:/java</b>. Of course, if you've installed elsewhere, or have
|
|
different Java software, you will need to adjust the pathnames
|
|
accordingly. First, use the instructions above for Visual C++ 5.0 or 6.0
|
|
to open the Tools/Options tabbed dialog for adding include directories.
|
|
In addition to the directories specified above, add
|
|
<b>d:/java/include</b> and <b>d:/java/include/win32</b>. These are
|
|
the directories needed when including <b>jni.h</b>. Now, before
|
|
clicking OK, under <i>Show directories for</i>, choose
|
|
<i>Executable files</i>. Add <b>d:/java/bin</b>. That directory
|
|
is needed to find javac. Now select OK.
|
|
<p>Select <i>Active Project Configuration</i> under the
|
|
<i>Build</i> pull-down menu. Choose <i>db_java - Win32
|
|
Release</i>. To build, select <i>Build
|
|
libdb_java32.dll</i> under the <i>Build</i> pull-down
|
|
menu. This builds the Java support library for Berkeley DB and compiles all
|
|
the java files, placing the class files in the <b>java/classes</b>
|
|
subdirectory of Berkeley DB. Set your environment variable CLASSPATH to
|
|
include this directory, your environment variable PATH to include the
|
|
<b>build_win32/Release</b> subdirectory, and as a test, try running
|
|
the command:
|
|
<p><blockquote><pre>java com.sleepycat.examples.AccessExample</pre></blockquote>
|
|
<h3>Including the Tcl API</h3>
|
|
<p>Tcl support is not built automatically. See
|
|
<a href="../../ref/tcl/intro.html">Loading Berkeley DB with Tcl</a> for information
|
|
on sites from which you can download Tcl and which Tcl versions are
|
|
compatible with Berkeley DB.
|
|
<p>The Tcl library must be built as the same build type as the Berkeley DB
|
|
library (both Release or both Debug). We have found that the binary
|
|
release of Tcl can be used with the Release configuration of Berkeley DB, but
|
|
for the Debug configuration, you will need to need to build Tcl from
|
|
sources. Before building Tcl, you will need to modify its makefile to
|
|
make sure you are building a debug version, including thread support.
|
|
This is because the set of DLLs linked into the Tcl executable must
|
|
match the corresponding set of DLLs used by Berkeley DB.
|
|
<p>These notes assume Tcl is installed as <b>d:/tcl</b>, but you can
|
|
change that if you wish. If you run using a different version of Tcl
|
|
than the one currently being used by Sleepycat Software, you will need
|
|
to change the name of the Tcl library used in the build (e.g.,
|
|
tcl83d.lib) to the appropriate name. See
|
|
Projects->Settings->Link in the db_tcl subproject.
|
|
<p>Use the instructions above for
|
|
Visual C++ 5.0 or 6.0 to open the <i>Tools/Options</i> tabbed dialog
|
|
for adding include directories. In addition to the directories specified
|
|
above, add <b>d:/tcl/include</b>. This is the directory that contains
|
|
<b>tcl.h</b>.
|
|
Then, in that same dialog, show directories for "Library Files".
|
|
Add <b>d:/tcl/lib</b> (or whatever directory contains
|
|
<b>tcl83d.lib</b> in your distribution) to the list. Now select OK.
|
|
<p>Select <i>Active Project Configuration</i> under the
|
|
<i>Build</i> pull-down menu. Choose <i>db_tcl - Win32
|
|
Release</i>. To build, select <i>Build
|
|
libdb_tcl32.dll</i> under the <i>Build</i> pull-down
|
|
menu. This builds the Tcl support library for Berkeley DB, placing the result
|
|
into <b>build_win32/Release/libdb_tcl32.dll</b>.
|
|
Selecting an Active Configuration of <i>db_tcl - Win32 Debug</i>
|
|
will build a debug version, placing the result into
|
|
<b>build_win32/Debug/libdb_tcl32d.dll</b>.
|
|
<table><tr><td><br></td><td width="1%"><a href="../../ref/build_unix/ultrix.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/build_win/test.html"><img src="../../images/next.gif" alt="Next"></a>
|
|
</td></tr></table>
|
|
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
|
|
</body>
|
|
</html>
|