Home » Developer & Programmer » Precompilers, OCI & OCCI » PCC-S-02322, found undefined identifier compiling under Fedora 6
PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #266417] Mon, 10 September 2007 17:08 Go to next message
Kiyomori
Messages: 6
Registered: May 2005
Junior Member
Hi !

In trying to precompile the sample1.pc demo program (on a Fedora 6 X86-64 box), using command line
proc iname=sample1.pc code=cpp
(and I used code=cpp because when I didn't I got errors in gconv.h trying to handle size_t)

I got the following errors...
System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg

Semantic error at line 97, column 23, file sample1.pc:
EXEC SQL CONNECT :username IDENTIFIED BY :password;
......................1
PCC-S-02322, found undefined identifier
Semantic error at line 97, column 47, file sample1.pc:
EXEC SQL CONNECT :username IDENTIFIED BY :password;
..............................................1
PCC-S-02322, found undefined identifier
Semantic error at line 120, column 19, file sample1.pc:
INTO :emprec INDICATOR :emprec_ind
..................1
PCC-S-02322, found undefined identifier
Semantic error at line 120, column 37, file sample1.pc:
INTO :emprec INDICATOR :emprec_ind
....................................1
PCC-S-02322, found undefined identifier
Semantic error at line 122, column 28, file sample1.pc:
WHERE EMPNO = :emp_number;
...........................1
PCC-S-02322, found undefined identifier


For reference, my pcscfg file is....

sys_include=(/build/s630/precomp/public,/usr/include,/opt/gcc33/lib64/gcc-lib/x86_64-suse-linux/3.3/include,/usr/lib/gcc-lib/x86_64-r edhat-linux/3.2.3/include,/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/include,/usr/include/linux,/usr/lib/gcc/x86_64-redhat-linux/4.1. 1/include)
ltype=long
define=__x86_64__
include=(/u01/app/oracle/product/10.2.0/db_1/precomp/public)
include=/u01/app/oracle/product/10.2.0/db_1/precomp/hdrs


[Edit: remove big size]

[Updated on: Mon, 10 September 2007 23:34] by Moderator

Report message to a moderator

Re: PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #266458 is a reply to message #266417] Mon, 10 September 2007 23:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
With your options: use a DECLARE section to declare your bind variables.

Regards
Michel
Re: PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #266468 is a reply to message #266458] Mon, 10 September 2007 23:56 Go to previous messageGo to next message
Kiyomori
Messages: 6
Registered: May 2005
Junior Member
I'm sorry.

I don't understand.

Please explain. Do you mean add DECLARE to the proc command line ?
Re: PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #266501 is a reply to message #266468] Tue, 11 September 2007 01:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
in Pro*C, with CODE=CPP, you have to define your bind variables in a DECLARE section that is between EXEC SQL BEGIN DECLARE SECTION and EXEC SQL END DECLARE SECTION.

Refer to your Pro*C Manual.

Regards
Michel
Re: PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #266508 is a reply to message #266501] Tue, 11 September 2007 01:25 Go to previous messageGo to next message
Kiyomori
Messages: 6
Registered: May 2005
Junior Member
Thanks.

I wonder if I might prevail upon you with another question.

When I want to compile sample1.pc as CODE=ANSI_C I get a mass of errors ...

$ proc iname=sample1.pc code=ansi_c

Pro*C/C++: Release 10.2.0.1.0 - Production on Tue Sep 11 02:36:37 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg

Syntax error at line 72, column 26, file /usr/include/gconv.h:
Error at line 72, column 26 in file /usr/include/gconv.h
unsigned char **, size_t *, int, int);
.........................1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:

... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.

Syntax error at line 88, column 7, file /usr/include/gconv.h:
Error at line 88, column 7 in file /usr/include/gconv.h
size_t *);
......1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:

... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.

Syntax error at line 97, column 6, file /usr/include/gconv.h:
Error at line 97, column 6 in file /usr/include/gconv.h
size_t *);
.....1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:

... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.

Syntax error at line 106, column 3, file /usr/include/gconv.h:
Error at line 106, column 3 in file /usr/include/gconv.h
__gconv_trans_fct __trans_fct;
..1
PCC-S-02201, Encountered the symbol "__gconv_trans_fct" when expecting one of th
e following:

char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,

Syntax error at line 0, column 0, file sample1.pc:
Error at line 0, column 0 in file sample1.pc
PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:

; : an identifier, end-exec, random_terminal

Error at line 0, column 0 in file sample1.pc
PCC-F-02102, Fatal error while doing C preprocessing
Re: PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #266521 is a reply to message #266508] Tue, 11 September 2007 01:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First,
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.

Then,
I will surely not help you as you will randomly try each value for each option.
I think it is obvious you are not satisfying CODE=ANSI_C but I don't have your code (don't post it).

Please read documentation.

Regards
Michel
Re: PCC-S-02322, found undefined identifier compiling under Fedora 6 [message #273831 is a reply to message #266521] Thu, 11 October 2007 17:50 Go to previous message
boludes
Messages: 7
Registered: October 2007
Location: Argentina
Junior Member
Hello, use parse full in options on Pro*c/c++ compiler!

Good luck!

Aca desde ARGENTINA!
HERE FROM ARGENTINA!
Previous Topic: OCISessionBegin failes for OS authentication
Next Topic: OCI: retrieving string-like data from output parameters effectively
Goto Forum:
  


Current Time: Thu Mar 28 12:27:59 CDT 2024