Document Type | Technical Information
Category | Interface/Integration
Document Number | TIITI033
Overview
Before installing iODBC, you need to set up the basic environment and perform preliminary checks.
This article explains how to check the compiler, verify the ODBC driver files, and set environment variables (Profile).
Method
Check Compiler
You need to verify whether a compiler (cc or gcc) is installed.
Depending on the compiler type, you should apply different CC parameters (compiler parameters) when installing iODBC.
Below is the method to check if the compiler is installed.
$ gcc -v (or cc -v) Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
Check libtbodbc.so File
Verify whether the libtbodbc.so file exists in the $TB_HOME/client/lib (or $TB_HOME/client/lib32) directory.
Below is an example execution in a 64bit environment.
[Linux] Execution Result
$ file $TB_HOME/client/lib/libtbodbc.so /tibero/tibero6/client/lib/libtbodbc.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
[AIX] Execution Result
$ file $TB_HOME/client/lib/libtbodbc.so /tibero/tibero6/client/lib/libtbodbc.so: 64-bit XCOFF executable or object module not stripped
PROFILE Setting โ Add Library Path
Add the path of the libtbodbc.so file to the LD_LIBRARY_PATH environment variable in the environment configuration file.
NoteDifferent environment variables may be used depending on the operating system.Example) AIX - uses LIBPATH / HP - uses SHLIB_PATH environment variables
[Linux โ .bash_profile]
export LD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib:$LD_LIBRARY_PATH
[AIX โ .profile]
export LIBPATH=$TB_HOME/lib:$TB_HOME/client/lib:$LIBPATH
[HP โ .profile]
export SHLIB_PATH =$TB_HOME/lib:$TB_HOME/client/lib:$ SHLIB_PATH
PROFILE Setting โ Add iODBC Environment Variables
Add iODBC related environment variables to the environment configuration file.
[Linux โ .bash_profile]
### iodbc setting ### export IODBC_HOME=$HOME/iodbc export LD_LIBRARY_PATH=$IODBC_HOME/lib:$LD_LIBRARY_PATH export PATH=$IODBC_HOME/bin:$PATH
[AIX โ .profile]
If the machine is 64bit, add the OBJECT_MODE=64 variable.
### iodbc setting ### export IODBC_HOME=$HOME/iodbc export LD_LIBRARY_PATH=$IODBC_HOME/lib:$LD_LIBRARY_PATH export PATH=$IODBC_HOME/bin:$PATH" export OBJECT_MODE=64