Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to compile and link OCI in HP-UX without linking to libocci

Pedro Dinis
Advisor

I need to compile and link OCI in HP-UX without linking to libocci

I need to compile and link OCI in HP-UX without linking to libocci

this a piece of the demo that comes with Oracle
////demo.mk

CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS)

buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS)
$(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).10.1 $(ICLIBHOME)libclntsh$(SO_EXT)
$(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).10.1 $(ICLIBHOME)libocci$(SO_EXT)
$(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB)
$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
$(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)


the problem is that we have code that compiles and executes with g++ but with aCC does not execute very using gsoap, and we are also using OCCI to connect to the Oracle Database. WELL this does not work because libocci it is compiled with aCC , and we cannot mix g++ with aCC , and we cannot compile libocci with g++.

so, i am trying to use OCI with C compile it with gcc, but, i cannot find a oci.so or oci.a in the hp-ux to link with the source code.

(this is an example that i found in the web)
gcc -o cdemo81.exe -I$ORACLE_HOME/oci/include cdemo81.c $ORACLE_HOME/bin/oci.dll

i missing something here

thanks
SLB SLB SLB Glorioso
1 REPLY
Dennis Handly
Acclaimed Contributor

Re: I need to compile and link OCI in HP-UX without linking to libocci

>aCC does not execute very using gsoap

Did you ever figure this out in your thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1144374