Re: Hello world program loads unused Oracle SO libraries
- From: Dan Espen <daneNO@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 03 Nov 2006 16:22:36 -0500
herbert koelman <herbert.koelman@xxxxxxxx> writes:
kermit wrote:
On Wed, 01 Nov 2006 13:40:43 +0100, herbert koelman wrote:
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
Hello there,
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 $@
.
- Follow-Ups:
- Re: Hello world program loads unused Oracle SO libraries
- From: herbert koelman
- Re: Hello world program loads unused Oracle SO libraries
- 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
- Prev by Date: Re: NEWBIE : Detect and restart closed apps.
- Next by Date: Re: Hello world program loads unused Oracle SO libraries
- Previous by thread: Re: Hello world program loads unused Oracle SO libraries
- Next by thread: Re: Hello world program loads unused Oracle SO libraries
- Index(es):
Relevant Pages
|