Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: C++ linking to Oracle lib problem

Re: C++ linking to Oracle lib problem

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Thu, 14 Oct 1999 09:01:59 GMT
Message-ID: <7u4664$8d5$1@nnrp1.deja.com>


In article
<Pine.GSO.4.10.9910131916400.8520-100000_at_soso.eecs.umich.edu>,   Minya Liang <minyal_at_eecs.umich.edu> wrote:
> Hi,
> i have embedded sql in a c++ program, and got past the precompiler
(pro*c)
> and g++ -c ...(generate .o file) stages.
> then i linked the .o file with the oracle lib, and other libs by
>
> g++ -o myfile myfile.o -L/usr/caen/oracle-8.0.4/lib/ -lclntsh ...(some
> other .o files and libs)
>
> no error by the linker.
>
> but when i try to run "myfile", i get :
>
> ld.so.1: auc: fatal: libclntsh.so.1.0: open failed: No such file or
> directory
>
> supposedly the libclntsh.so is linked by
> "L/usr/caen/oracle-8.0.4/lib/ -lclntsh"
> and the libclntsh.so file actually EXISTS in the
> /usr/caen/oracle-8.0.4/lib/ dir.
>
> why can't "ld" find it???
>

I had the same problem. Now it's OK.
The problem was caused by invalid LD_LIBRARY_PATH. LD_LIBRARY_PATH must contain $ORACLE_HOME/lib.

Try to check LD_LIBRARY_PATH.

        Alex

> thanks,
>
> LMY
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 14 1999 - 04:01:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US