Re: Hello world program loads unused Oracle SO libraries
- From: herbert koelman <herbert.koelman@xxxxxxxx>
- Date: Sat, 04 Nov 2006 15:12:02 +0100
Dan Espen wrote:
herbert koelman <herbert.koelman@xxxxxxxx> writes:
kermit wrote:On Wed, 01 Nov 2006 13:40:43 +0100, herbert koelman wrote:Hello there,
I've written the classic hello.c (the one that says hello world).... because you linked agained libocci ( -locci in your compile
I used a makefile that builds programs to run against Oracle using
OCCI. So make runs this command:
cc -I
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/
-g -D_REENTRANT -I
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/
-g
-D_REENTRANT -L
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib -L
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -locci
-lclntsh -lpthread hello.c -o hello
This produced the hello program.
So far still good. Now I run the program and obtains:
[herbert@pc-bureau src]$ ./hello herbert
./hello: error while loading shared libraries: libocci.so.10.1:
cannot open shared object file: No such file or directory
I don't understand why would the program try to load a library it
is not using !!??
flags).
Obviously for just a hello world program, you wouldn't need to link
against these
Do you mean that I have to set different library flags according to
what I'm about to build ?
Maybe.
Then I would need a Makefile to build hello world programs and another
one for Oracle programs ? Or is there away to handle both cases in one
makefile.
pgm1: pgm1.o ....
cc -locci -o $@
pgm2: pgm2.o ....
cc -o $@
Ok I get it.
Thanks a lot
.
- References:
- Re: Hello world program loads unused Oracle SO libraries
- From: kermit
- Re: Hello world program loads unused Oracle SO libraries
- From: herbert koelman
- Re: Hello world program loads unused Oracle SO libraries
- From: Dan Espen
- Re: Hello world program loads unused Oracle SO libraries
- Prev by Date: Re: Hello world program loads unused Oracle SO libraries
- Next by Date: Re: NEWBIE : Detect and restart closed apps.
- Previous by thread: Re: Hello world program loads unused Oracle SO libraries
- Index(es):
Relevant Pages
|