Skip Headers
Oracle® XML Developer's Kit Programmer's Guide,
11g Release 1 (11.1)

Part Number B28394-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

23 Getting Started with C++ XDK Components

This chapter describes the Oracle Database installation of the XDK. Note that the C++ demo programs are located on the Examples media.

This chapter contains these topic:

Installing the C++ XDK Components

The C++ XDK components are included with Oracle Database and Oracle Application Server.

Refer to "Installing the XDK" for installation instructions.

See Also:

"Overview of Oracle XML Developer's Kit (XDK)" for a list of the C++ XDK components

Configuring the UNIX Environment for C++ XDK Components

This section contains the following topics:

C++ XDK Component Dependencies on UNIX

The C++ libraries described in this section are located in $ORACLE_HOME/lib. The C and C++ XDK components are contained in the following library:

libxml10.a

In addition to the C XDK components described in "C XDK Component Dependencies on UNIX", the library includes the XML class generator, which creates C++ source files based on an input DTD or XML Schema.

Table 16-1 in "C XDK Component Dependencies on UNIX" describes the Oracle CORE and Globalization Support libraries on which the C XDK components (UNIX) depend. The library dependencies are the same for C and C++.

Setting C++ XDK Environment Variables on UNIX

Table 16-2 in "Setting C XDK Environment Variables on UNIX" describes the UNIX environment variables required for use with the C XDK components. The environment variables are the same for C and C++.

Testing the C++ XDK Runtime Environment on UNIX

You can test your environment by running any of the utilities described in Table 16-3 in "Testing the C XDK Runtime Environment on UNIX". These utilities are C utilities that do not have C++ versions.

Setting Up and Testing the C++ XDK Compile-Time Environment on UNIX

Both the C and C++ header files are located in $ORACLE_HOME/xdk/include. Table 23-1 describes the C++ header files. Table 16-4 in "Setting Up and Testing the C XDK Compile-Time Environment on UNIX" describes the C header files. Your runtime environment must be set up before you can compile your C++ code.

Table 23-1 Header Files in the C++ XDK Compile-Time Environment

Header File Description

oraxml.hpp

Includes the Oracle9i XML ORA datatypes and the public ORA APIs included in libxml.a (for backward compatibility only).

oraxmlcg.h

Includes the C APIs for the C++ class generator (for backward compatibility only).

oraxsd.hpp

Includes the Oracle9i XSD validator datatypes and APIs (for backward compatibility only)

xml.hpp

Handles the Unified DOM APIs transparently, whether you use them through OCI or standalone

xmlotn.hpp

Includes the common APIs, whether you compile standalone or use OCI and the Unified DOM

xmlctx.hpp

Includes the initialization and exception-handling public APIs


Testing the C++ XDK Compile-Time Environment on UNIX

The simplest way to test your compile-time environment is to run the make utility on the sample programs. The demo programs are located on the Examples media rather than the Oracle Database CD. After you install these programs, they will be located in $ORACLE_HOME/xdk/demo/cpp.

Build and run the sample programs by executing the following commands at the system prompt:

cd $ORACLE_HOME/xdk/demo/cpp
make

Verifying the C++ XDK Component Version on UNIX

To obtain the version of XDK you are using, change into $ORACLE_HOME/lib and run the following command as the system prompt:

strings libxml10.a | grep -i developers

Configuring the Windows Environment for C++ XDK Components

This section contains the following topics:

C++ XDK Component Dependencies on Windows

The C++ libraries described in this section are located in %ORACLE_HOME%\lib. The XDK C and C++ components are contained in the following Windows library:

libxml10.dll

Table 16-5 in "C XDK Component Dependencies on Windows" describes the Oracle CORE and Globalization Support libraries on which the C components for Windows depend. The library dependencies are the same for C and C++.

Setting C++ XDK Environment Variables on Windows

Table 16-6 in "Setting C XDK Environment Variables on Windows" describes the Windows environment variables required for use with the XDK C components. The environment variables are the same for C and C++.

Testing the C++ XDK Runtime Environment on Windows

You can test your environment by running any of the utilities described in Table 16-7 in "Testing the C XDK Runtime Environment on Windows". These utilities are C utilities that do not have C++ versions.

Setting Up and Testing the C++ XDK Compile-Time Environment on Windows

Table 23-1 in the section "Setting Up and Testing the C++ XDK Compile-Time Environment on UNIX" describes the header files required for compilation of the C components on Windows. The relative filenames are the same on both UNIX and Windows installations.

On Windows the header files are located in %ORACLE_HOME%\xdk\include. Note that your runtime environment must be set up before you can compile your code.

Testing the C++ XDK Compile-Time Environment on Windows

You can test your compile-time environment by compiling the demo programs, which are located in %ORACLE_HOME%\xdk\demo\cpp if you have installed the Oracle Database Examples media.

The procedure for setting the C++ compiler path is identical to the procedure described in "Setting the C XDK Compiler Path on Windows". The procedure for editing the Make.bat files is identical to the procedure described in "Editing the Make.bat Files on Windows".

Using the C++ XDK Components with Visual C/C++

You can set up a project in Microsoft Visual C/C++ and use it for the demos included in the XDK. Refer to "Using the C XDK Components with Visual C/C++ on Windows" for instructions.