Can any one tell me the setup to comple Pro*C in SUN Solaris, I would like to know the step by step and the options and parameter to be used to compile Pro*C program. I tried to compile Sample1 using demo_proc.mk file but it has come out with error saying xO2 not found. so pls help me as how to set the profile and options for compiling Pro*C.
you should install the pro*c compiler from the oracle cd.
Then you sould use the following command:
$ORACLE_HOME/bin/proc code=cpp sys_include=(...) include= (...) cpp_suffix=(...) char_map=STRING iname=...
sys_include = compiler and system specific includes (like /opt/SUNWspro/SC5.0/include/CC for Sun C++ compilter ver 5.0)
include = oracle include directories and your code include directories (see below)
cpp_suffix = the output of the proc (C/CPP)
iname = file name to compile
Oracle include directories:
When you compile the c/cpp use these flags:
I tried to comple with these setting ...but I am getting the below error...
gcc -xO2 -Xa xstrconst -XF -mr -xarch=V8 -xcache=16/32/1:1024/64/1
-xchip=ultra -D_REENTRANT -K PIC _DPRECOMP -I.
-DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -C sample1.c
gcc: PIC: No such file or directory
gcc: unrecognized option '-Xa'
gcc: unrecognized option '-K'
gcc: language chip=ultra not recognized
***Error code 1
make: fatal error: Command failed for target 'sample1.o'
Current Working directory /oracle/app/oracle/product/8.1/precop/demo/proc
***Error code 1
make: fatel error: Command failed for target 'sample1'
Click Here to Expand Forum to Full Width