Pro*C Compile
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Pro*C Compile

Hybrid View

  1. #1
    Join Date
    Jul 2001
    Posts
    6

    Question

    Hi

    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.

    Thanks

  2. #2
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    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:
    $ORACLE_HOME/precomp/public$ORACLE_HOME/plsql/public,$ORACLE_HOME/network/public,$ORACLE_HOME/rdbms/demo,$ORACLE_HOME/rdbms/public

    When you compile the c/cpp use these flags:
    -I$ORACLE_HOME/precomp/public
    -I$ORACLE_HOME/plsql/public
    -I$ORACLE_HOME/rdbms/demo
    -I$ORACLE_HOME/rdbms/public

  3. #3
    Join Date
    Jul 2001
    Posts
    6
    Thanks,
    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.
    -I/oracle/app/oracle/product/8.1/precop/public
    -I/oracle/app/oracle/product/8.1/rdbms/public
    -I/oracle/app/oracle/product/8.1/rdbms/demo
    -I/oracle/app/oracle/product/8.1/plsql/public
    -I/oracle/app/oracle/product/8.1/network/public
    -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'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width