Showing results for 
Search instead for 
Did you mean: 

Pro *C

Sandeep Ganguly
Occasional Visitor

Pro *C

I have been using oracle on hp unix 11.11. I am trying to compile a Pro *c program. Since the has to be used i am trying to customise it but there are many variables defined which i am not able to figure. Can anyone help me out.
say my pro c programs are x1.pc which uses x2.pc
uses sql script x3.sql

what are the variables that i should remove from the given in oracle home../proc/demo path
Indira Aramandla
Honored Contributor

Re: Pro *C

Hi Sandeep,

$ORACLE_HOME/precomp/demo/proc/ makefile can be used to precompile, compile and link Pro*C application executables. You can customize (if you need) to compile/ build Pro*C programs.

For Example:
The command for making myprog executable from myprog.pc is
make -f build OBJS="myprog.o" EXE=myprog
You can also give precompiler options using PROCFLAGS
For example:
make -f build OBJS="myprog.o" EXE=myprog PROCFLAGS="sqlcheck=semantics userid=scott/tiger"
If you are trying to compile a Pro *c program using the, you may use this command to build your custom programs. For example, Your Prog is x1.pc

Copy the sample programs and makefile into your working directory.

Enter the following command to build x1.pc:

make -f build EXE=x1 OBJS=x1.o

Run the program:
$> x1

Indira A
Never give up, Keep Trying
Werner Ittner
Occasional Advisor

Re: Pro *C


for simple C - Programs I just do it this way : (It is for 10g, but I think it is very similar for 9g)

Precompile :
just : proc filename.pc

Compile :
gcc -O -I. -I$ORACLE_HOME/precomp/public \n
-c filename.c

Link :
gcc -o filename.r filename.o \n
-L$ORACLE_HOME/lib -lclnts

Run :