OCILIB (C and C++ Driver for Oracle)  4.9.0
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
Installation
Compatibility

The current version of OCILIB has been validated on:

Note
OCILIB is compatible with:
  • Any existing Oracle version starting from 8i
  • Future Oracle versions (subject to Oracle backward compatibility)

Please contact the author if you have validated OCILIB on platforms or compilers not listed here.

Global build options

OCILIB supports the following global build options:

=> Oracle import modes

=> Oracle charset modes

=> Calling convention

Note

On Windows, OCI_API MUST be set to __stdcall in order to use the prebuilt libraries. The header file "ocilib.h" automatically sets OCI_API to __stdcall when using MSVC.

Using OCILIB on Unix-like systems

OCILIB uses GNU Autotools for compilation and installation on Unix-like platforms.

Uncompress the archive (ocilib-x.y.z-gnu.tar.gz)

Check the shared library path environment variable (LD_LIBRARY_PATH, LD_PATH, ...):

In order to get these values loaded at logon time, export these values in your .profile configuration file :

GNU Installation options :

OCILIB supports some options that are not needed for most common configurations.

List of available options:

Note

–with-oracle-headers-path and –with-oracle-lib-path are primarily meant to be used with Instant Client, but can also be used with a regular client when libraries and headers are not located in standard system paths.

Note

If the Oracle OCI linkage mode is set to 'linkage' (default) and no Oracle lib path is provided, the OCILIB configure script tries to locate the Oracle library folder following this sequence :

Note

To compile native 64-bit versions of OCILIB, you might need to pass compiler-specific flags to the configure script (e.g. '-m64' for GCC).

To use OCILIB in a project:

where :

Some older version of Oracle 8 have direct path API symbols located in the library libclient8. With these versions, you must include as well the linker flag -lclient8 to use Direct Path API.

Using OCILIB on Microsoft Windows

OCILIB distribution packages provide prebuilt 32-bit and 64-bit DLLs.

[x] is the compiled version of OCILIB ('a' -> ANSI / UTF-8, 'w' -> wide character, e.g. UTF-16 on Windows)

To use OCILIB in a project :

Note for recompiling OCILIB:

Note

The OCI import mode (OCI_IMPORT_LINKAGE or OCI_IMPORT_RUNTIME) is only used when compiling OCILIB source code.

Oracle Instant Client Support

OCILIB supports Oracle Instant Client.

On Windows, there is no difference between using a regular Oracle Client and an Instant Client with OCILIB.

On Unix-like systems, the Instant Client is divided in different packages.

Public headers and shared libs are not part of the same package.

So, you must provide the following options to the configure command:

If your instant client package containing the shared libs does not have a symbolic link 'libclntsh.[shared lib extension]' to the fully qualified shared lib real name, you must create it:

Example on Linux: