Compiling and linking a program v15
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.soOn Windows:
edboci.dll
The files are installed in the oci/lib subdirectory.
Compiling and linking a sample program
This example compiles and links the sample program edb_demo.c in a Linux environment. The edb_demo.c file is located in the oci/samples subdirectory.
Set
ORACLE_HOMEto the complete pathname of the Oracle home directory, for example:export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/serverSet
EDB_HOMEto the complete pathname of the home directory, for example:export EDB_HOME=/usr/edbSet
LD_LIBRARY_PATHto the complete path oflibpthread.so. By default,libpthread.sois located in/lib64.export LD_LIBRARY_PATH=/lib64/lib:$LD_LIBRARY_PATHSet
LD_LIBRARY_PATHto include the EDB Postgres Advanced Server Open Client library. By default,libedboci.sois located in$EDB_HOME/oci/lib.export LD_LIBRARY_PATH=$EDB_HOME/oci:$EDB_HOME/oci/lib:$LD_LIBRARY_PATHCompile and link the OCL API program:
cd $EDB_HOME/oci/samples make
- On this page
- Compiling and linking a sample program