Menu

linking with ocilib

2010-02-03
2012-09-26
  • GIlles  Maria-Sube

    Hello,

    I'm tryng to compile a source db.c intended to generate an executble named db
    with following command:

    gcc -o db db.c -I/.../ocilib-3.5.0/include -L/.../ocilib-3.5.0/src/.libs
    -locilib

    (assuming environment variables are correctly set, especially $ORACLE_HOME and
    $LD_LIBRARY_PATH which containts the path for /.../ocilib-3.5.0/src/.libs),
    but this fails and I got a list of undifined calls for such routines as
    OCI_ReleaseResultSet, etc...
    Obviously, the option -locilib is not sufficient, what else to do?

    Thank you in advance for answer

     
  • Vincent Rogier

    Vincent Rogier - 2010-02-04

    why don't you install ocilib properly ?

    you need to link -L$ORACLE_HOME/lib -lclntsh as well