Home » Developer & Programmer » Precompilers, OCI & OCCI » PCC-S-02015 and oci.h
PCC-S-02015 and oci.h [message #147185] Wed, 16 November 2005 03:26 Go to next message
silk
Messages: 5
Registered: November 2005
Location: France
Junior Member
Hi,

First time I'm working with CLOB in a ProC program. [The version of my database is 9.2.0.5, running on Solaris O/S (2.Cool.]

Here is the ProC Code ( part of star_qr_bd.pc ):

>> #include <oci.h>
>> #include <stdio.h>
>> #include <string.h>
>> #include <stdlib.h>
>> #include <sqlda.h>
>> #include <sqlcpr.h>
>>
>> #include <sqlca.h>
>>
[ ..... ]
>> int f_tu_temp (void)
>> {
>> OCIClobLocator *v_clobReponseCORE;
>> int v_iCodeRetour = 0;
>>
>> EXEC SQL ALLOCATE :v_clobReponseCORE;
>>
[ ..... ]
>>
>> return 0;
>> } /* f_tu_temp */
>>
[ ..... ]

When I compile I've got the following error :

>> Pro*C/C++: Release 9.2.0.5.0 - Production on Wed Nov 16 09:55:48 2005
>>
>> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>>
>> System default option values taken from: /product/oracle/9.2.0.5/precomp/admin/pcscfg.cfg
>>
>> Error at line 13, column 10 in file star_qr_bd.pc
>> #include <oci.h>
>> .........1
>> PCC-S-02015, unable to open include file
>> /opt/SUNWspro/bin/cc -xO3 -Xa -xstrconst -xF -xarch=v8 -xchip=ultra -W2,-AKNR_S -W2,-Rglobal_hoist -Wc,-Qdelay-speculate -Wc,-Qdepgraph-safe_spec_load=3 -W2,-Rloop -errtags=yes -v -K PIC -DPRECOMP -I/product/oracle/9.2.0.5/precomp/hdrs -I/product/oracle/9.2.0.5/precomp/public -I/product/oracle/9.2.0.5/precomp/include -I/product/oracle/9.2.0.5/oracore/include -I/product/oracle/9.2.0.5/oracore/public -I/product/oracle/9.2.0.5/oracore/port/include -I/product/oracle/9.2.0.5/xdk/include -I/product/oracle/9.2.0.5/xdk/public -I/product/oracle/9.2.0.5/nlsrtl/include -I/product/oracle/9.2.0.5/slax/include -I. -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT -c star_qr_bd.c
>> "star_qr_bd.c", line 157: cannot find include file: <oci.h>
>> "star_qr_bd.c", line 428: undefined symbol: OCIClobLocator
>> "star_qr_bd.c", line 428: undefined symbol: v_clobReponseCORE
>> cc: acomp failed for star_qr_bd.c
>> *** Error code 2
>> make: Fatal error: Command failed for target `star_qr_bd.o'


My makefile is below :

>> include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
>>
>> CC=/opt/SUNWspro/bin/cc
>> PROCFLAGS="CODE=ANSI_C"
>>
>> RM=/bin/rm -f
>>
>> # ================================================================== #
>>
>> DIR_PRJ=${STAR_HOME}
>> DIR_BIN=$(DIR_PRJ)/bin
>> DIR_INC=$(DIR_PRJ)/projet/include
>> DIR_OBJ=$(DIR_PRJ)/projet/obj
>> DIR_SRC=$(DIR_PRJ)/projet/src
>>
>> # ================================================================== #
>>
>> build: $(DIR_BIN)/qrstaradm
>>
>> # ================================================================== #
>>
>> $(DIR_BIN)/qrstaradm: $(DIR_OBJ)/star_qr_main.o $(DIR_OBJ)/star_qr_srv.o $(DIR_OBJ)/star_qr_agt.o $(DIR_OBJ)/star_qr_mq.o $(DIR_OBJ)/star_qr_cmn.o $(DIR_OBJ)/star_qr_tu.o star_qr_bd.o
>> $(CC) $(LFLAGS32) $(DIR_OBJ)/star_qr_main.o $(DIR_OBJ)/star_qr_srv.o $(DIR_OBJ)/star_qr_agt.o $(DIR_OBJ)/star_qr_mq.o $(DIR_OBJ)/star_qr_cmn.o $(DIR_OBJ)/star_qr_tu.o star_qr_bd.o -o $(DIR_BIN)/qrstaradm -lmqm $(LDPATHFLAG)$(LIBHOME) $(PROLDLIBS)
>> mv *.o $(DIR_OBJ)
>> rm star_qr_bd.c
>>
>> # ================================================================== #
>>
>> $(DIR_OBJ)/star_qr_main.o: $(DIR_SRC)/star_qr_main.c $(DIR_INC)/star_qr_mq.h $(DIR_INC)/star_qr_cmn.h $(DIR_INC)/star_qr_tu.h $(DIR_INC)/star_qr_srv.h
>> $(CC) $(CFLAGS32) -c $(DIR_SRC)/star_qr_main.c; mv *.o $(DIR_OBJ)
>>
>> $(DIR_OBJ)/star_qr_srv.o: $(DIR_SRC)/star_qr_srv.c $(DIR_INC)/star_qr_srv.h $(DIR_INC)/star_qr_mq.h $(DIR_INC)/star_qr_cmn.h $(DIR_INC)/star_qr_bd.h
>> $(CC) $(CFLAGS32) -c $(DIR_SRC)/star_qr_srv.c; mv *.o $(DIR_OBJ)
>>
>> $(DIR_OBJ)/star_qr_agt.o: $(DIR_SRC)/star_qr_agt.c $(DIR_INC)/star_qr_agt.h $(DIR_INC)/star_qr_mq.h $(DIR_INC)/star_qr_cmn.h $(DIR_INC)/star_qr_bd.h
>> $(CC) $(CFLAGS32) -c $(DIR_SRC)/star_qr_agt.c; mv *.o $(DIR_OBJ)
>>
>> $(DIR_OBJ)/star_qr_mq.o: $(DIR_SRC)/star_qr_mq.c $(DIR_INC)/star_qr_mq.h
>> $(CC) $(CFLAGS32) -c $(DIR_SRC)/star_qr_mq.c; mv *.o $(DIR_OBJ)
>>
>> $(DIR_OBJ)/star_qr_cmn.o: $(DIR_SRC)/star_qr_cmn.c $(DIR_INC)/star_qr_cmn.h
>> $(CC) $(CFLAGS32) -c $(DIR_SRC)/star_qr_cmn.c; mv *.o $(DIR_OBJ)
>>
>> $(DIR_OBJ)/star_qr_tu.o: $(DIR_SRC)/star_qr_tu.c $(DIR_INC)/star_qr_tu.h
>> $(CC) $(CFLAGS32) -c $(DIR_SRC)/star_qr_tu.c; mv *.o $(DIR_OBJ)
>>
>> # ================================================================== #
>>
>> .SUFFIXES: .pc .c .o
>>
>> pc.c:
>> $(PROC_32) $(PROCFLAGS) iname=$*
>>
>> .pc.o:
>> $(PROC_32) $(PROCFLAGS) iname=$*
>> $(CC) $(CFLAGS32) -c $*.c
>>
>> # ================================================================== #
>>
>> clean:
>> $(RM) $(DIR_OBJ)/*.o $(DIR_BIN)/qrstaradm
>> $(RM) $(DIR_SRC)/star_qr_bd.o $(DIR_SRC)/star_qr_bd.c
>>
icon14.gif  Re: PCC-S-02015 and oci.h [message #147239 is a reply to message #147185] Wed, 16 November 2005 10:11 Go to previous message
silk
Messages: 5
Registered: November 2005
Location: France
Junior Member
Hi,

I found the solution in the Metalink Note 74896.1. I'm sending it.

Now it's compiling.

Thanks.
Steph.
Previous Topic: storage procedure , parameter , C#
Next Topic: ORA-01019: unable to allocate memory in the user side
Goto Forum:
  


Current Time: Wed Jul 08 02:30:45 CDT 2020