QOpenOCCI Documentation

Introduction

This is the main page for all documentation related QOpenOCCI. Here you will find documentation for all headers, internal sources, examples and tests.

Links

Building and Compiling

First read the Trolltech documentation on building their OCI plugin. Second, read the OCILib documentation. OCILib can do runtime or compile time linking to the client libraries and OCILib also provides all neaded headers for the build. Therefor it is no longer required to have the client installed to build QOpenOCCI, but it is still required at runtime.

Step 1: Get the Client

Download the Instant Client Basic or Basic-lite and the sdk from Oracle's website. Version 11.1.0 is what I will use here.

Step 2: Install the Client and SDK

You may either install the RPMs or get the zip files. If you do not use RPMs, then installing the client is somewhat system dependent. For Windows put the files where your compiler can find them. For Linux, I use /opt/, but you may install them system-wide by placing the files in /usr/lib on most systems.

It is important that you have the clntsh (linux) and oci (windows) libraries and the sdk directory extracted in known a place!

Note:
On Linux machines setup symlinks for the libs if needed...
    cd /path/to/instantclient_11_1/
    ln -s libclntsh.so.11.1 libclntsh.so
   

Step 3: Compile

To compile, the compiler will need to know where libraries are located. You may not have to set OCCI_LIBS since OCILib can do runtime linking, but this is the safe way.

Linux

   cd /path/to/QOpenOCCI/src
   export OCI_INCLUDES="-L/opt/instantclient_11_1/sdk/include"
   export OCI_LIBS="-L/opt/instantclient_11_1/ -lclntsh"
   qmake-qt4 ; make
   

Windows

   cd /path/to/QOpenOCCI/src
   set OCI_INCLUDES="/path/to/instantclient_11_1/sdk/include"
   set OCI_LIBS="/path/to/instantclient_11_1/sdk/lib/msvc/oci.lib"
   qmake
   make (or nmake for VS)
   

Installing

There many options to using/installing the plugin. See Trolltech's documentation on plugins and deployment for more info.

Note:
Make sure the InstantClient libraries can be found by the OS at runtime or else strange things will happen! In Windows that means the client MUST have the InstantClient DLL files installed. Same goes for Linux system with exception that the path to the .so files can be set via the command line by...
   LD_LIBRARY_PATH=/path/to/oracle/instant/client:${LD_LIBRARY_PATH} /path/to/app
   

Generated on Tue Mar 18 22:56:50 2008 for QOpenOCCI by  doxygen 1.5.3