|
These instructions assume that you have either built Berkeley DB XML for Windows from source, or have downloaded the prebuilt binaries for Windows. It is assumed that you have Microsoft Visual C++ available, and for the Java examples, access to a Java compiler. These instructions apply only to the C++ and Java examples. There are Python examples in the Berkeley DB XML examples/python directory, and Perl examples in the Berkeley DB XML src/perl/examples directory.
The build_win32 directories in both the Berkeley DB XML source and binary distributions contain project files for Berkeley DB XML examples for Microsoft Visual C++:
Project File | Description |
---|---|
dbxml_gettingStarted.dsw | Visual C++ 6.0 workspace |
*.dsp | Visual C++ 6.0 projects (one for each example) |
These project files can be used to build Berkeley DB XML examples for any Win32 platform: Windows/XP, Windows/2000, Windows/NT, Windows/98 and Windows/95.
Berkeley DB XML makes use of some third-party libraries, including Berkeley DB, Pathan, and Xerces-C++. If this is a binary download, the examples projects expect to find header files for these libraries in ../include and the libraries themselves in ../lib. If you are using a source download, it is expected that these products have been loaded and built in the directories, lib/db-4.2.52, lib/libpathan-1.2, and lib/xerces-c-src2_4_0.
To build all C++ examples from source, open the file build_win32/dbxml_gettingStarted.dsw. Next, select Active Project Configuration under the Build pull-down menu. For a release version of the examples, select all -- Win32 Release. Results from this build are put into build_win32/Release. For a debug version, select all -- Win32 Debug; results are put into build_win32/Debug. Debug examples cannot be built from the binary distribution because debug libraries are not provided. Finally, to build, select the Build menu option under the Build pull-down menu.
To open build_win32/dbxml_gettingStarted.dsw in Visual C++ .NET choose Open Solution from the File menu. Then choose Compatible Workspace Files under Files of type. After you select the workspace, you will be prompted to upgrade the project files. Choose Yes to All.
Next, select Configuration Manager under the Build pull-down menu. For a debug version of the libraries, tools, and examples, select Debug. Results from this build are put into build_win32/Debug. For a release version, select Release; results are put into build_win32/Release. Finally, to build, select the Build all menu option under the Build pull-down menu.
The dbxml_examples_java project includes a Custom Build Step that builds the Java example files. 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.
It is necessary to add the proper include files for Java. In Visual C++ open the Tools/Options tabbed dialog for adding directories. To do this, select 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. Add these include directories: 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. Ensure that you have the CLASSPATH environment variable defined. At a minimum it should have the value ".", the current directory.
To build the Java examples select Active Project Configuration under the Build pull-down menu. Choose dbxml_examples_java -- Win32 Release.
To make use of the Berkeley DB XML Java API set your environment variable CLASSPATH to include the full pathname of the dbxml.jar file, as well as the db.jar file from Berkeley DB, 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).
If you have trouble with any of these commands, please send email to the support addresses found in the Sleepycat Software contact information. In that email, please include the following information:
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.