Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pro*C compiler failing due to incorrect pcscfg.cfg. how do i setup correct

859327Jun 26 2011 — edited Jun 26 2011
this is my code in C Proc

#include <stdio.h>
#include <string.h>
#include <sqlda.h>
#include <sqlcpr.h>


EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;

EXEC SQL INCLUDE SQLCA.H;

void main()
{

strcpy(uid.arr,"test");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"test");
pwd.len = strlen(pwd.arr);

EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY :pwd USING:soabam;

printf("Connected to Oracle8i using soademo/soademo\n");

EXEC SQL COMMIT WORK RELEASE;
return;

errexit:
printf("Connection failed");
return;


} /* end of main */


locate stddef.h
/usr/include/linux/stddef.h
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/include/stddef.h
/usr/lib/syslinux/com32/include/stddef.h
/usr/lib/syslinux/com32/include/bitsize/stddef.h
/usr/src/linux-headers-2.6.38-8/include/linux/stddef.h
/usr/src/linux-headers-2.6.38-8-generic/include/linux/stddef.h

this is my pcscfg.cfg file look like and i am using Oracle XE in Ubuntu.
sys_include=(/usr/include,/usr/include/linux,/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/include)
ltype=short

when i give the command proc Sample.PC
i get the following error.



Pro*C/C++: Release 10.2.0.1.0 - Production on Sat Jun 25 22:53:45 2011

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

System default option values taken from: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/precomp/admin/pcscfg.cfg

Error at line 53, column 11 in file /usr/include/libio.h
# include <stdarg.h>
..........1
PCC-S-02015, unable to open include file
Syntax error at line 332, column 3, file /usr/include/libio.h:
Error at line 332, column 3 in file /usr/include/libio.h
size_t __pad5;
..1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the 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,
The symbol "enum," was substituted for "size_t" to continue.

Syntax error at line 364, column 62, file /usr/include/libio.h:
Error at line 364, column 62 in file /usr/include/libio.h
typedef __ssize_t __io_read_fn (void __cookie, char __buf, size_t __nbytes);
.............................................................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 373, column 6, file /usr/include/libio.h:
Error at line 373, column 6 in file /usr/include/libio.h
size_t __n);
.....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 416, column 34, file /usr/include/libio.h:
Error at line 416, column 34 in file /usr/include/libio.h
extern int __underflow (_IO_FILE *);
.................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 417, column 30, file /usr/include/libio.h:
Error at line 417, column 30 in file /usr/include/libio.h
extern int __uflow (_IO_FILE *);
.............................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 418, column 33, file /usr/include/libio.h:
Error at line 418, column 33 in file /usr/include/libio.h
extern int __overflow (_IO_FILE *, int);
................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 460, column 31, file /usr/include/libio.h:
Error at line 460, column 31 in file /usr/include/libio.h
extern int IOgetc (_IO_FILE *__fp);
..............................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 461, column 31, file /usr/include/libio.h:
Error at line 461, column 31 in file /usr/include/libio.h
extern int IOputc (int __c, IOFILE *__fp);
..............................1
PCC-S-02201, Encountered the symbol "_IO_FILE" when expecting one of the followi
ng:

... 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 "_IO_FILE" to continue.

Syntax error at line 462, column 31, file /usr/include/libio.h:
Error at line 462, column 31 in file /usr/include/libio.h
extern int IOfeof (_IO_FILE *__fp) __THROW;
..............................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 463, column 33, file /usr/include/libio.h:
Error at line 463, column 33 in file /usr/include/libio.h
extern int IOferror (_IO_FILE *__fp) __THROW;
................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 465, column 39, file /usr/include/libio.h:
Error at line 465, column 39 in file /usr/include/libio.h
extern int IOpeekc_locked (_IO_FILE *__fp);
......................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 471, column 37, file /usr/include/libio.h:
Error at line 471, column 37 in file /usr/include/libio.h
extern void IOflockfile (_IO_FILE *) __THROW;
....................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 472, column 39, file /usr/include/libio.h:
Error at line 472, column 39 in file /usr/include/libio.h
extern void IOfunlockfile (_IO_FILE *) __THROW;
......................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 473, column 39, file /usr/include/libio.h:
Error at line 473, column 39 in file /usr/include/libio.h
extern int IOftrylockfile (_IO_FILE *) __THROW;
......................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 490, column 34, file /usr/include/libio.h:
Error at line 490, column 34 in file /usr/include/libio.h
extern int IOvfscanf (_IO_FILE * __restrict, const char * __restrict,
.................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 491, column 4, file /usr/include/libio.h:
Error at line 491, column 4 in file /usr/include/libio.h
IOva_list, int *__restrict);
...1
PCC-S-02201, Encountered the symbol "__gnuc_va_list" when expecting one of the f
ollowing:

... 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 "auto," was substituted for "__gnuc_va_list" to continue.

Syntax error at line 492, column 35, file /usr/include/libio.h:
Error at line 492, column 35 in file /usr/include/libio.h
extern int IOvfprintf (_IO_FILE __restrict, const char __restrict,
..................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 493, column 5, file /usr/include/libio.h:
Error at line 493, column 5 in file /usr/include/libio.h
IOva_list);
....1
PCC-S-02201, Encountered the symbol "__gnuc_va_list" when expecting one of the f
ollowing:

... 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 "auto," was substituted for "__gnuc_va_list" to continue.

Syntax error at line 494, column 39, file /usr/include/libio.h:
Error at line 494, column 39 in file /usr/include/libio.h
extern IOssize_t IOpadn (_IO_FILE *, int, IOssize_t);
......................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 495, column 19, file /usr/include/libio.h:
Error at line 495, column 19 in file /usr/include/libio.h
extern IOsize_t IOsgetn (_IO_FILE *, void *, IOsize_t);
..................1
PCC-S-02201, Encountered the symbol "_IO_sgetn" when expecting one of the follow
ing:

; , = ( [
The symbol "=" was substituted for "_IO_sgetn" to continue.

Syntax error at line 495, column 40, file /usr/include/libio.h:
Error at line 495, column 40 in file /usr/include/libio.h
extern IOsize_t IOsgetn (_IO_FILE *, void *, IOsize_t);
.......................................1
PCC-S-02201, Encountered the symbol "," when expecting one of the following:

( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,

Error at line 0, column 0 in file Sample.PC
PCC-F-02102, Fatal error while doing C preprocessing
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2011
Added on Jun 26 2011
4 comments
6,760 views