Compiling and Linking a Program v13
The EDB Open Client Library allows applications written using the Oracle Call Interface API to connect to and access an EDB database with minimal changes to the C source code. The EDB Open Client Library files are named:
On Linux:
libedboci.so
On Windows:
edboci.dll
The files are installed in the oci/lib
subdirectory.
Compiling and Linking a Sample Program
The following example compiles and links the sample program edb_demo.c
in a Linux environment. The edb_demo.c
is located in the oci/samples
subdirectory.
Set the
ORACLE_HOME
andEDB_HOME
environment variables.Set
ORACLE_HOME
to the complete pathname of the Oracle home directory.
For example:
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
- Set
EDB_HOME
to the complete pathname of the home directory.
For example:
export EDB_HOME=/usr/edb
- Set
LD_LIBRARY_PATH
to the complete path oflibpthread.so
. By default,libpthread.so
is located in/lib64
.
export LD_LIBRARY_PATH=/lib64/lib:$LD_LIBRARY_PATH
- Set
LD_LIBRARY_PATH
to include the Advanced Server Open Client library. By default,libiconv.so.2
is located in$EDB_HOME/oci/lib
.
export LD_LIBRARY_PATH=$EDB_HOME/oci:$EDB_HOME/oci/lib:$LD_LIBRARY_PATH
- Then, compile and link the OCL API program.
cd $EDB_HOME/oci/samples
make