Oracle, Solaris 8 and ensuring dynamic linking

From: Phill W. <p-.-a-.-w-a-r-d-_at_-o-p-e-n-.-a-c-.-u-k>
Date: Mon, 13 Oct 2008 10:37:19 +0100
Message-ID: <gcv4sf$bij$1_at_south.jnrs.ja.net>



(Apologies if I'm in the wrong place; please feel free to point a Newbie in the right direction).

We're starting to migrate a swathe of Solaris 8-hosted, embedded SQL, 'C' programs from Ingres to Oracle.

In the past we've "suffered" with having to statically link the Ingres client libraries into each and every Executable, which I'd like to avoid, going forward.

What compiler (cc)/linker (ld) options do we need to specify to use to ensure that the Oracle client libraries are loaded /dynamically/?

We're currently "getting things to work" using:

[makefile]

   ORACLE_ORACLE=*-L $(ORACLE_HOME)/lib32 -l clntsh*    OTHER_LIBS= . . .
   PROC_C=lines=yes

...then...

$(NAME).c : $(NAME).pc

     proc $(PROC_C) $(NAME).pc

$(NAME).o : $(NAME).c

     $(CC) -g -c $(NAME).c -o $(NAME).o

$(NAME).exe : $(NAME).o $(OTHER_LIBS)

     $(CC) -g $(ORACLE_LIBS) $(OTHER_LIBS) \
       -o $(NAME).exe

[Quoted] but I have a nasty feeling that will statically link the run-time.

TIA,
    Phill W. Received on Mon Oct 13 2008 - 11:37:19 CEST

Original text of this message