soci.h
and soci.cpp
are the main files
of the library - the ones that you have to directly interface with. The
soci-common.h
file (located in the backends/
directory of the library distribution) is an internal abstract
interface to the actual backends, which are needed to perform
operations on the given database server. Normally, the C++ client
program needs to interface with the soci.h
header file
only, unless it needs to gain direct access to the internal handles of
the backend.Everything in SOCI (and in soci.h
in particular) is
declared in the namespace SOCI
.
All code examples presented in this documentation assume that your code
begins with something
like:
#include "soci.h" |
In Project Properties:
oci.h
file
is located (it can be something like C:\Oracle\Ora81\oci\include
).oci.lib
file is located (it can be something like C:\Oracle\Ora81\oci\lib\msvc
).oci.lib
.When executing programs, the oci.dll
file should be
located in the path
where it can be found. Be careful when using many different Oracle
tools,
because they may overwrite each other's oci.dll
versions.
The "correct" oci.dll
for running the program compiled as
above is located
somewhere near the oci.lib
, for example in C:\Oracle\Ora81\BIN
.
The OCI library is usually inside the libclntsh.so
or libclntsh.sl
library
(depending on the actual system), so you have to add the -lclntsh
option
for linking and -L
option to provide the path to the
linker.
Of course, the -I
compiler option will be needed to
provide the location
of the oci.h
header file.
Look inside the $ORACLE_HOME
directory to find where
these files are located
- it may depend both on the Unix flavour and the Oracle version
installed,
but likely locations are $ORACLE_HOME/rdbms/demo
for oci.h
and $ORACLE_HOME/lib
for libclntsh.so
.
Previous
(Contents) |
Next (Errors) |