OCILIB (C Driver for Oracle) 3.12.0
Installing OCILIB

Actual version of OCILIB has been validated on :


The validation of OCILIB on OpenVMS is still pending.

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

From v3.6.0, OCI_CHARSET_WIDE replaces OCI_CHARSET_UNICODE OCI_CHARSET_UNICODE remains a valid identifier for backward compatibility

=> Calling convention (WINDOWS ONLY)


On Windows, OCI_API MUST be set to __stdcall in order to use prebuilt libraries From v3.5.0, ocilib.h automatically sets OCI_API to __stdcall with MS compilers

Installing OCILIB on UNIX like systems

OCILIB uses GNU tools for deployment 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:


--with-oracle-headers-path and --with-oracle-lib-path are meant to be used with Instant client only but can used for regular client of libs and headers are not located in usual folders


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


To compile native 64 bits versions of OCILIB, you need pass your compiler specifics flags to the configure script.

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.

Installing and using OCILIB on Microsoft Windows

32bits and 64bits DLLs are provided for x86 architectures. Visual .NET (2005/2008) solutions are also provided to recompile the Dlls and the demo.

[x] is the compiled version of OCILIB ('a' -> ANSI, 'w' -> Unicode, 'm' -> Mixed)

To use OCILIB in a project :

Note for MinGW users:


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 Microsoft 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: