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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Linker can't find libclntsh.so under Linux with Oracle8

Re: Linker can't find libclntsh.so under Linux with Oracle8

From: Stefan Englert <senglert_at_intradat.com>
Date: 2000/06/02
Message-ID: <8h8mqi$6p0$1@nathan.regio.net>#1/1

Hi,

try this in your makefile, this should work :)



INCLUDEPATH=-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/network/public -I$( ORACLE_HOME)/plsql/public
LIBPATH=-L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/network/lib LIBS=-lclntsh .....
CFLAGS= ..... $(INCLUDEPATH)
GPP=g++

yourbin: xxxx.o yyyy.o
  ${GPP} ${CFLAGS} ..... $(LIBPATH) $(LIBS)


so you only have to set ORACLE_HOME to your oracle directory...

Stefan

Timo Volkmer <timo.volkmer_at_lhsytems.com> schrieb in im Newsbeitrag: 8h3h03$lan_at_ar4dec01.ar4.fra.dlh.de...
> Hi everybody,
>
> I am not an advanced user and I am having problems linking some of my C++
> programs with Oracle V8.0.5 under SuSE Linux 6.2.
> I use g++ (egcs 2.91.66). The linker does not find the shared library
> libclntsh.so:
>
>
> Linker command:
>
> g++ -Wl,shared -L/usr/oracle/V8.0.5/lib -lclntsh ...
>
> The error-message says "clntsh: no such file or directory ..."
> The environment variable LD_LIBRARY_PATH is set to
> /usr/oracle/V8.0.5/lib/ which should be correct. When I look into
> this directory I can find the following (besides all other libs):
>
> lrwxrwxrwx 1 root root 16 Feb 7 20:00 libclntsh.so ->
> libclntsh.so.1.0*
> -rwxr-xr-x 1 oracle dba 4381924 Feb 7 19:48 libclntsh.so.1.0*
>
> The linker seems to find all other libs. Only the shared one (which has a
> softlink)
> showas these problems. When I change the linker command to the following:
>
> -Wl,-shared -L/usr/oracle/V8.0.5/lib /usr/oracle/V8.0.5/lib/libclntsh.so
>
> then it works.
>
> What can the problem be? I have this kind of problem experienced with
 many
> different libs and also while I was trying to include some header-files.
 I
> am a kind of deserted here ...
>
> I'll appreciate any help ... Thanks!
>
> Timo.
>
> eMail: timo.volkmer_at_lhsystems.com
>
>
>
Received on Fri Jun 02 2000 - 00:00:00 CDT

Original text of this message

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