head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.54.59; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.37; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.37; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.11; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.49.02; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.12.06.00.08.15; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.59; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @ Berkeley DB Reference Guide: Building for Win32

Berkeley DB Reference Guide:
Building Berkeley DB for Windows systems

PrevRefNext

Building for Win32

The build_win32 directory in the Berkeley DB distribution contains project files for both MSVC 5.0 and 6.0:

Project FileDescription
Berkeley_DB.dsw Visual C++ 5.0 project (compatible with 6.0)
*.dsp Visual C++ 5.0 subprojects (compatible with 6.0 )

These project files can be used to build Berkeley DB for any Win32 platform: Windows 2000, Windows NT, Windows 98 and Windows 95.

Building With Visual C++ 6.0

Open the file Berkeley_DB.dsw. 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 with the instructions for building with Visual C++ 5.0.

Note that when you build a release version, you may receive a warning about an unknown compiler option /Ob2. This is apparently a flaw in the project conversion for Visual C++ and can be ignored.

Each release of Berkeley DB is built and tested with this procedure using Microsoft Visual C++ 6.0, Standard Edition.

Building With Visual C++ 5.0

Open the file Berkeley_DB.dsw. This workspace includes a number of subprojects needed to build Berkeley DB.

First, you'll need to set the include directories. To do this, select Options... from the Tools pull-down menu. At this point, a tabbed dialog should appear. In this new window, choose the Directories tab. For the Platform, select Win32 and for Show directories for, select Include files. Below these options, you should add two directories to the list of directories: the full pathname of the build_win32 subdirectory of Berkeley DB, followed by the full pathname of the include subdirectory of Berkeley DB. Then click OK.

Then, select Active Project Configuration under the Build pull-down menu. For a debug version of the libraries, tools, and examples, select db_buildall -- Win32 Debug. Results from this build are put into build_win32/Debug. For a release version, select db_buildall -- Win32 Release; results are put into build_win32/Release. For a debug version that has all tools and examples built with static libraries, select db_buildall -- Win32 Debug Static; results are put into build_win32/Debug_static. For a release version of the same, select db_buildall -- Win32 Release Static; results are put into build_win32/Release_static. Finally, to build, select Build db_buildall.exe under the Build pull-down menu.

When building your application, you should normally use compile options "debug multithreaded dll" and link against build_win32/Debug/libdb33d.lib. If you want to link against a static (non-DLL) version of the library, use the "debug multithreaded" compile options and link against build_win32/Debug_static/libdb33sd.lib. You can also build using a release version of the libraries and tools, which will be placed in build_win32/Release/libdb33.lib. The static version will be in build_win32/Release_static/libdb33s.lib.

Each release of Berkeley DB is built and tested using Microsoft Visual C++ 5.0 and 6.0.

Including the C++ API

C++ support is built automatically on Win32.

Including the Java API

Java support is not built automatically. The following instructions assume that you have installed the Sun Java Development Kit in d:/java. Of course, if you installed elsewhere or have different Java software, you will need to adjust the pathnames accordingly. First, use the previous instructions 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 previously, add d:/java/include and d:/java/include/win32. These are the directories needed when including jni.h. Now, before clicking OK, choose Executable files under Show directories for. Add d:/java/bin. That directory is needed to find javac. Now select OK.

Select Active Project Configuration under the Build pull-down menu. Choose db_java -- Win32 Release. To build, select Build libdb_java33.dll under the Build pull-down menu. This builds the Java support library for Berkeley DB and compiles all the java files, placing the class files in the java/classes subdirectory of Berkeley DB. Set your environment variable CLASSPATH to include this directory, your environment variable PATH to include the build_win32/Release subdirectory, and try running the following command as a test:

java com.sleepycat.examples.AccessExample

Including the Tcl API

Tcl support is not built automatically. See Loading Berkeley DB with Tcl for information on sites from which you can download Tcl and which Tcl versions are compatible with Berkeley DB.

The Tcl library must be built as the same build type as the Berkeley DB library (both Release or both Debug). We found that the binary release of Tcl can be used with the Release configuration of Berkeley DB, but you will need to need to build Tcl from sources for the Debug configuration. Before building Tcl, you will need to modify its makefile to make sure that 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.

These notes assume that Tcl is installed as d:/tcl, but you can change that if you want. If you run using a version of Tcl different from the one currently being used by Sleepycat Software, you will need to change the name of the Tcl library used in the build (for example, tcl83d.lib) to the appropriate name. See Projects->Settings->Link in the db_tcl subproject.

Use the previous instructions 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 previously, add d:/tcl/include. This is the directory that contains tcl.h. Then, in that same dialog, show directories for "Library Files". Add d:/tcl/lib (or whatever directory contains tcl83d.lib in your distribution) to the list. Now, select OK.

Select Active Project Configuration under the Build pull-down menu. Choose db_tcl -- Win32 Release. To build, select Build libdb_tcl33.dll under the Build pull-down menu. This builds the Tcl support library for Berkeley DB, placing the result into build_win32/Release/libdb_tcl33.dll. Selecting an Active Configuration of db_tcl -- Win32 Debug will build a debug version, placing the result into build_win32/Debug/libdb_tcl33d.dll.

PrevRefNext

Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d27 1 a27 1 Windows/XP, Windows/2000, Windows/NT, Windows/98 and Windows/95. d68 1 a68 1 build_win32/Debug/libdb40d.lib. If you want d71 1 a71 1 build_win32/Debug_static/libdb40sd.lib. You can d73 1 a73 1 placed in build_win32/Release/libdb40.lib. d75 1 a75 1 build_win32/Release_static/libdb40s.lib. d96 1 a96 1 libdb_java40.dll under the Build pull-down d98 5 a102 11 the java files, placing the resulting db.jar and dbexamples.jar files in the build_win32/Release subdirectory of Berkeley DB. Set your environment variable CLASSPATH to include the full pathname of these jar files, and your environment variable PATH to include the build_win32/Release subdirectory. On Windows, remember that files or directories in the CLASSPATH and PATH variables must be separated by semicolons (unlike UNIX). Then, try running the following command as a test: d121 1 a121 1 tcl83d.lib) to the appropriate name. See d134 1 a134 1 libdb_tcl40.dll under the Build pull-down d136 1 a136 1 into build_win32/Release/libdb_tcl40.dll. d139 1 a139 1 build_win32/Debug/libdb_tcl40d.dll. @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d2 1 a2 1 a3 1 d19 1 a19 1 for Microsoft Visual C++: d22 3 a24 2 Berkeley_DB.dsw Visual C++ 6.0 workspace *.dsp Visual C++ 6.0 projects d28 12 a39 1

Building Berkeley DB with Visual C++

d41 1 a41 5 of subprojects needed to build Berkeley DB. To do this in Visual C++ .NET, choose Open Solution from the File menu. Then choose Compatible Workspace Files under Files of type. After you select Berkeley_DB.dsw, you will be prompted to upgrade the project files. Choose Yes to All. d43 23 a65 27 Options... from the Tools pull-down menu. In Visual C++ 6.0, a tabbed dialog should appear. Choose the Directories tab in the dialog, and for the Platform, select Win32. In Visual C++ .NET, a different window appears. Choose Projects, then VC++ Directories.

In either case, choose Include files under Show directories for. You should then add two directories to the list of directories: the full pathname of the build_win32 subdirectory of Berkeley DB, followed by the full pathname of the dbinc subdirectory of Berkeley DB. Then click OK.

In Visual C++ 6.0, select Active Project Configuration under the Build pull-down menu. For a debug version of the libraries, tools, and examples, select build_all -- Win32 Debug. Results from this build are put into build_win32/Debug. For a release version, select build_all -- Win32 Release; results are put into build_win32/Release. For a debug version that has all tools and examples built with static libraries, select build_all -- Win32 Debug Static; results are put into build_win32/Debug_static. For a release version of the same, select build_all -- Win32 Release Static; results are put into build_win32/Release_static. Finally, to build, select Build build_all.exe under the Build pull-down menu.

In Visual C++ .NET, choose the configuration from the drop down list on the tool bar (Debug, Release, Debug Static or Release Static). Then, to build, right-click on build_all and choose Build. d68 11 a78 13 build_win32/Debug/libdb41d.lib. If you want to link against a static (non-DLL) version of the library, use the "debug multithreaded" compile options and link against build_win32/Debug_static/libdb41sd.lib. You can also build using a release version of the libraries and tools, which will be placed in build_win32/Release/libdb41.lib. The static version will be in build_win32/Release_static/libdb41s.lib.

Each release of Berkeley DB is built and tested with this procedure using Microsoft Visual C++ 6.0, Standard Version and Microsoft Visual C++ .NET, Standard Version.

Building the C++ API

d80 1 a80 1

Building the Java API

d83 7 a89 6 d:/java. Of course, if you installed elsewhere or have different Java software, you will need to adjust the pathnames accordingly. First, use the previous instructions to open the Tools/Options window for adding include directories. In addition to the directories specified previously, add d:/java/include and d:/java/include/win32. These are the directories needed when including jni.h. Now, before d91 18 a108 20 directories for. Add d:/java/bin. That directory is needed to find javac. Now select OK.

In Visual C++ 6.0, select Active Project Configuration under the Build pull-down menu. Choose db_java -- Win32 Release. To build, select Build libdb_java41.dll under the Build pull-down menu. This builds the Java support library for Berkeley DB and compiles all the java files, placing the resulting db.jar and dbexamples.jar files in the build_win32/Release subdirectory of Berkeley DB.

In Visual C++ .NET, set the build type to Release in the drop down list on the toolbar, then right-click on db_java and choose Build.

To run Java code, set your environment variable CLASSPATH to include the full pathname of these jar files, and your environment variable PATH to include the build_win32/Release subdirectory. On Windows, remember that files or directories in the CLASSPATH and PATH variables must be separated by semicolons (unlike UNIX). Then, try running the following command as a test: d110 1 a110 7

If you want to run Java code using a Debug build, it is slightly more complicated. Make sure you build the Debug version of db_java instead of the Release version. Also make sure that your PATH contains build_win32/Debug. Then run the following (as one command):

java -dsleepycat.db.libname=libdb_java41d com.sleepycat.examples.AccessExample

Building the Tcl API

d112 2 a113 2 Loading Berkeley DB with Tcl for information on sites from which you can download Tcl and which Tcl versions are d115 8 a122 8

The Tcl library must be built as the same build type as the Berkeley DB library (both Release or both Debug). We found that the binary release of Tcl can be used with the Release configuration of Berkeley DB, but you will need to need to build Tcl from sources for the Debug configuration. Before building Tcl, you will need to modify its makefile to make sure that 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. d124 3 a126 3 change that if you want. If you run using a version of Tcl different from the one currently being used by Sleepycat Software, you will need to change the name of the Tcl library used in the build (for example, d129 3 a131 3

Use the previous instructions for Visual C++ to open the Tools/Options window for adding include directories. In addition to the directories specified previously, add d133 8 a140 8 tcl.h. Then, in that same window, choose Library Files under Show directories for. Add d:/tcl/lib (or whatever directory contains tcl83d.lib in your distribution) to the list. Now, select OK.

In Visual C++ 6.0, select Active Project Configuration under the Build pull-down menu. Choose db_tcl -- Win32 Release. To build, select Build libdb_tcl41.dll under the Build pull-down d142 4 a145 7 into build_win32/Release/libdb_tcl41.dll. Selecting an Active Configuration of db_tcl -- Win32 Debug will build a debug version, placing the result into build_win32/Debug/libdb_tcl41d.dll.

In Visual C++ .NET, choose the build type (Debug or Release) from the drop down list on the toolbar, then right-click on db_tcl and choose Build. @ 1.1.1.4 log @Import: RPM 4.1 @ text @d2 1 a2 1 d4 1 d20 1 a20 1 for both MSVC 5.0 and 6.0: d23 2 a24 3 Berkeley_DB.dsw Visual C++ 5.0 project (compatible with 6.0) *.dsp Visual C++ 5.0 subprojects (compatible with 6.0 ) d28 1 a28 12

Building With Visual C++ 6.0

Open the file Berkeley_DB.dsw. 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 with the instructions for building with Visual C++ 5.0.

Note that when you build a release version, you may receive a warning about an unknown compiler option /Ob2. This is apparently a flaw in the project conversion for Visual C++ and can be ignored.

Each release of Berkeley DB is built and tested with this procedure using Microsoft Visual C++ 6.0, Standard Edition.

Building With Visual C++ 5.0

d30 5 a34 1 of subprojects needed to build Berkeley DB. d36 27 a62 23 Options... from the Tools pull-down menu. At this point, a tabbed dialog should appear. In this new window, choose the Directories tab. For the Platform, select Win32 and for Show directories for, select Include files. Below these options, you should add two directories to the list of directories: the full pathname of the build_win32 subdirectory of Berkeley DB, followed by the full pathname of the include subdirectory of Berkeley DB. Then click OK.

Then, select Active Project Configuration under the Build pull-down menu. For a debug version of the libraries, tools, and examples, select db_buildall -- Win32 Debug. Results from this build are put into build_win32/Debug. For a release version, select db_buildall -- Win32 Release; results are put into build_win32/Release. For a debug version that has all tools and examples built with static libraries, select db_buildall -- Win32 Debug Static; results are put into build_win32/Debug_static. For a release version of the same, select db_buildall -- Win32 Release Static; results are put into build_win32/Release_static. Finally, to build, select Build db_buildall.exe under the Build pull-down menu. d65 13 a77 11 build_win32/Debug/libdb40d.lib. If you want to link against a static (non-DLL) version of the library, use the "debug multithreaded" compile options and link against build_win32/Debug_static/libdb40sd.lib. You can also build using a release version of the libraries and tools, which will be placed in build_win32/Release/libdb40.lib. The static version will be in build_win32/Release_static/libdb40s.lib.

Each release of Berkeley DB is built and tested using Microsoft Visual C++ 5.0 and 6.0.

Including the C++ API

d79 1 a79 1

Including the Java API

d82 6 a87 7 d:/java. Of course, if you installed elsewhere or have different Java software, you will need to adjust the pathnames accordingly. First, use the previous instructions 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 previously, add d:/java/include and d:/java/include/win32. These are the directories needed when including jni.h. Now, before d89 20 a108 18 directories for. Add d:/java/bin. That directory is needed to find javac. Now select OK.

Select Active Project Configuration under the Build pull-down menu. Choose db_java -- Win32 Release. To build, select Build libdb_java40.dll under the Build pull-down menu. This builds the Java support library for Berkeley DB and compiles all the java files, placing the resulting db.jar and dbexamples.jar files in the build_win32/Release subdirectory of Berkeley DB. Set your environment variable CLASSPATH to include the full pathname of these jar files, and your environment variable PATH to include the build_win32/Release subdirectory. On Windows, remember that files or directories in the CLASSPATH and PATH variables must be separated by semicolons (unlike UNIX). Then, try running the following command as a test: d110 7 a116 1

Including the Tcl API

d118 2 a119 2 Loading Berkeley DB with Tcl for information on sites from which you can download Tcl and which Tcl versions are d121 8 a128 8

The Tcl library must be built as the same build type as the Berkeley DB library (both Release or both Debug). We found that the binary release of Tcl can be used with the Release configuration of Berkeley DB, but you will need to need to build Tcl from sources for the Debug configuration. Before building Tcl, you will need to modify its makefile to make sure that 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. d130 3 a132 3 change that if you want. If you run using a version of Tcl different from the one currently being used by Sleepycat Software, you will need to change the name of the Tcl library used in the build (for example, d135 3 a137 3

Use the previous instructions 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 previously, add d139 8 a146 8 tcl.h. Then, in that same dialog, show directories for "Library Files". Add d:/tcl/lib (or whatever directory contains tcl83d.lib in your distribution) to the list. Now, select OK.

Select Active Project Configuration under the Build pull-down menu. Choose db_tcl -- Win32 Release. To build, select Build libdb_tcl40.dll under the Build pull-down d148 7 a154 4 into build_win32/Release/libdb_tcl40.dll. Selecting an Active Configuration of db_tcl -- Win32 Debug will build a debug version, placing the result into build_win32/Debug/libdb_tcl40d.dll. @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d2 1 a2 1 a3 1 d19 1 a19 1 for Microsoft Visual C++: d22 3 a24 2 Berkeley_DB.dsw Visual C++ 6.0 workspace *.dsp Visual C++ 6.0 projects d28 12 a39 1

Building Berkeley DB with Visual C++

d41 1 a41 5 of subprojects needed to build Berkeley DB. To do this in Visual C++ .NET, choose Open Solution from the File menu. Then choose Compatible Workspace Files under Files of type. After you select Berkeley_DB.dsw, you will be prompted to upgrade the project files. Choose Yes to All. d43 23 a65 27 Options... from the Tools pull-down menu. In Visual C++ 6.0, a tabbed dialog should appear. Choose the Directories tab in the dialog, and for the Platform, select Win32. In Visual C++ .NET, a different window appears. Choose Projects, then VC++ Directories.

In either case, choose Include files under Show directories for. You should then add two directories to the list of directories: the full pathname of the build_win32 subdirectory of Berkeley DB, followed by the full pathname of the dbinc subdirectory of Berkeley DB. Then click OK.

In Visual C++ 6.0, select Active Project Configuration under the Build pull-down menu. For a debug version of the libraries, tools, and examples, select build_all -- Win32 Debug. Results from this build are put into build_win32/Debug. For a release version, select build_all -- Win32 Release; results are put into build_win32/Release. For a debug version that has all tools and examples built with static libraries, select build_all -- Win32 Debug Static; results are put into build_win32/Debug_static. For a release version of the same, select build_all -- Win32 Release Static; results are put into build_win32/Release_static. Finally, to build, select Build build_all.exe under the Build pull-down menu.

In Visual C++ .NET, choose the configuration from the drop down list on the tool bar (Debug, Release, Debug Static or Release Static). Then, to build, right-click on build_all and choose Build. d68 11 a78 13 build_win32/Debug/libdb41d.lib. If you want to link against a static (non-DLL) version of the library, use the "debug multithreaded" compile options and link against build_win32/Debug_static/libdb41sd.lib. You can also build using a release version of the libraries and tools, which will be placed in build_win32/Release/libdb41.lib. The static version will be in build_win32/Release_static/libdb41s.lib.

Each release of Berkeley DB is built and tested with this procedure using Microsoft Visual C++ 6.0, Standard Version and Microsoft Visual C++ .NET, Standard Version.

Building the C++ API

d80 1 a80 1

Building the Java API

d83 7 a89 6 d:/java. Of course, if you installed elsewhere or have different Java software, you will need to adjust the pathnames accordingly. First, use the previous instructions to open the Tools/Options window for adding include directories. In addition to the directories specified previously, add d:/java/include and d:/java/include/win32. These are the directories needed when including jni.h. Now, before d91 18 a108 20 directories for. Add d:/java/bin. That directory is needed to find javac. Now select OK.

In Visual C++ 6.0, select Active Project Configuration under the Build pull-down menu. Choose db_java -- Win32 Release. To build, select Build libdb_java41.dll under the Build pull-down menu. This builds the Java support library for Berkeley DB and compiles all the java files, placing the resulting db.jar and dbexamples.jar files in the build_win32/Release subdirectory of Berkeley DB.

In Visual C++ .NET, set the build type to Release in the drop down list on the toolbar, then right-click on db_java and choose Build.

To run Java code, set your environment variable CLASSPATH to include the full pathname of these jar files, and your environment variable PATH to include the build_win32/Release subdirectory. On Windows, remember that files or directories in the CLASSPATH and PATH variables must be separated by semicolons (unlike UNIX). Then, try running the following command as a test: d110 1 a110 7

If you want to run Java code using a Debug build, it is slightly more complicated. Make sure you build the Debug version of db_java instead of the Release version. Also make sure that your PATH contains build_win32/Debug. Then run the following (as one command):

java -dsleepycat.db.libname=libdb_java41d com.sleepycat.examples.AccessExample

Building the Tcl API

d112 2 a113 2 Loading Berkeley DB with Tcl for information on sites from which you can download Tcl and which Tcl versions are d115 8 a122 8

The Tcl library must be built as the same build type as the Berkeley DB library (both Release or both Debug). We found that the binary release of Tcl can be used with the Release configuration of Berkeley DB, but you will need to need to build Tcl from sources for the Debug configuration. Before building Tcl, you will need to modify its makefile to make sure that 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. d124 3 a126 3 change that if you want. If you run using a version of Tcl different from the one currently being used by Sleepycat Software, you will need to change the name of the Tcl library used in the build (for example, d129 3 a131 3

Use the previous instructions for Visual C++ to open the Tools/Options window for adding include directories. In addition to the directories specified previously, add d133 8 a140 8 tcl.h. Then, in that same window, choose Library Files under Show directories for. Add d:/tcl/lib (or whatever directory contains tcl83d.lib in your distribution) to the list. Now, select OK.

In Visual C++ 6.0, select Active Project Configuration under the Build pull-down menu. Choose db_tcl -- Win32 Release. To build, select Build libdb_tcl41.dll under the Build pull-down d142 4 a145 7 into build_win32/Release/libdb_tcl41.dll. Selecting an Active Configuration of db_tcl -- Win32 Debug will build a debug version, placing the result into build_win32/Debug/libdb_tcl41d.dll.

In Visual C++ .NET, choose the build type (Debug or Release) from the drop down list on the toolbar, then right-click on db_tcl and choose Build. @