This is a discussion on Error Building the Pro*C Program within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi all, When I try to compile my Pro*C program am getting the following error.. cc -I/sample/ -I/orabin/server/oracle/product/9.2.0/rdbms/demo -I/orabin/server/oracle/product/9.2.0/rdbms/public ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, When I try to compile my Pro*C program am getting the following error.. cc -I/sample/ -I/orabin/server/oracle/product/9.2.0/rdbms/demo -I/orabin/server/oracle/product/9.2.0/rdbms/public -I/orabin/server/oracle/product/9.2.0/precomp/public -c -g -KPIC -w -c sample.c; \ "sample.c", line 207: undefined symbol: EXEC "sample.c", line 207: syntax error before or at: ORACLE "sample.c", line 225: left operand of "." must be struct/union object "sample.c", line 225: cannot recover from previous errors cc: acomp failed for sample.c *** Error code 2 make: Fatal error: Command failed for target `sample.o' I have used the following in my sample.pc file: typedef char asciz; EXEC SQL BEGIN DECLARE SECTION; EXEC SQL TYPE asciz is string(20) ; EXEC SQL END DECLARE SECTION; Hope some of u would have already encountered this problem.. Any help regarding this is much appreciated.. Let me know if you need any more information... Thanks. |
| |||
| jvramya@mickeyfan.com wrote: > When I try to compile my Pro*C program am getting the following error.. > > cc -I/sample/ -I/orabin/server/oracle/product/9.2.0/rdbms/demo > -I/orabin/server/oracle/product/9.2.0/rdbms/public > -I/orabin/server/oracle/product/9.2.0/precomp/public -c -g -KPIC -w -c > sample.c; \ > > "sample.c", line 207: undefined symbol: EXEC > "sample.c", line 207: syntax error before or at: ORACLE Could you post line 207 of sample.c? Yours, Laurenz Albe |
| |||
| On 27 Mar 2006 01:02:56 -0800, jvramya@mickeyfan.com wrote: >EXEC ORACLE OPTION (MAXOPENCURSORS=2); >EXEC ORACLE OPTION (ORACA=YES); > >These are the codes that throws error.I feel i miss something in >makefile to fulfill these oracle specific declarations. You need to use the Pro*C preprocessor to convert the file to proper C code before using the C compiler, check the Pro*C documentation. -- echo papxc.sthrwpbeh@ugtt.ug | tr "p-za-o" "a-z" |
| ||||
| .... > cc -I/sample/ -I/orabin/server/oracle/product/9.2.0/rdbms/demo > -I/orabin/server/oracle/product/9.2.0/rdbms/public > -I/orabin/server/oracle/product/9.2.0/precomp/public -c -g -KPIC -w -c > sample.c; \ .... > I have used the following in my sample.pc file: > typedef char asciz; > > EXEC SQL BEGIN DECLARE SECTION; > EXEC SQL TYPE asciz is string(20) ; > > EXEC SQL END DECLARE SECTION; Your code is pro*c code, no "C" code. You need to preprocess it with proc precompiler. Generally, "pro*c" code is by convention named *.pc. You sould look at Oracle makefiles e.g. (without options) proc mycode.pc > mycode.c cc mycode.c -o mycode "oracle options to add" Regards, Stephane |
| Thread Tools | |
| Display Modes | |
|
|