Home » Developer & Programmer » Precompilers, OCI & OCCI » Pro C files not converting from .pc to .c (Linux )
Pro C files not converting from .pc to .c [message #572007] Wed, 05 December 2012 06:01 Go to next message
akshayarwind
Messages: 1
Registered: November 2012
Junior Member
I have a number of .pc (Pro C)files that I need to compile in Linux.When I am trying to build it using make
it gives the following error

Syntax error at line 32, column 33, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/cstdio:
Error at line 32, column 33 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/cstdio
# include _STLP_NATIVE_C_HEADER(stdio.h)
................................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,
The symbol "newline," was substituted for "(" to continue.

Syntax error at line 34, column 3, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/cstdio:
Error at line 34, column 3 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/cstdio
# endif
..1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 128, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/cstdio:
Error at line 128, column 2 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/cstdio
#endif
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 50, column 42, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/streambuf.h:
Error at line 50, column 42 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/streambuf.h
# include _STLP_NATIVE_OLD_STREAMS_HEADER(streambuf.h)
.........................................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,
The symbol "newline," was substituted for "(" to continue.

Syntax error at line 38, column 43, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/ostream.h:
Error at line 38, column 43 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/ostream.h
# include _STLP_NATIVE_OLD_STREAMS_HEADER(ostream.h)
..........................................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,
The symbol "newline," was substituted for "(" to continue.

Syntax error at line 47, column 42, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/istream.h:
Error at line 47, column 42 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/istream.h
# include _STLP_NATIVE_OLD_STREAMS_HEADER(istream.h)
.........................................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,
The symbol "newline," was substituted for "(" to continue.

Syntax error at line 50, column 42, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/iomanip.h:
Error at line 50, column 42 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/iomanip.h
# include _STLP_NATIVE_OLD_STREAMS_HEADER(iomanip.h)
.........................................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,
The symbol "newline," was substituted for "(" to continue.

Syntax error at line 29, column 31, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/functional:
Error at line 29, column 31 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/functional
# include _STLP_NATIVE_HEADER(functional)
..............................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,

Syntax error at line 30, column 3, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/functional:
Error at line 30, column 3 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/functional
# endif
..1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 41, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/functional:
Error at line 41, column 2 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/functional
#endif /* _STLP_FUNCTIONAL */
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 45, column 30, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/algorithm:
Error at line 45, column 30 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/algorithm
# include _STLP_NATIVE_HEADER(algorithm)
.............................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,

Syntax error at line 46, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/algorithm:
Error at line 46, column 2 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/algorithm
#endif /* _STLP_IMPORT_VENDOR_STD */
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 53, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/algorithm:
Error at line 53, column 2 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/algorithm
#endif /* _STLP_ALGORITHM */
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 36, column 30, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/iterator:
Error at line 36, column 30 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/iterator
# include _STLP_NATIVE_HEADER(iterator)
.............................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,

Syntax error at line 38, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/iterator:
Error at line 38, column 2 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/iterator
#endif /* IMPORT */
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 53, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/iterator:
Error at line 53, column 2 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/iterator
#endif /* _STLP_ITERATOR */
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Syntax error at line 41, column 31, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/vector:
Error at line 41, column 31 in file /home/corelogic/sunstudio12.1/prod/include/C
C/stlport4/vector
# include _STLP_NATIVE_HEADER(vector)
..............................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

: [ ] + / . .. an identifier, a numeric constant, newline,
define, elif, else, endif, error, if, ifdef, ifndef, include,
line, pragma, undef, exec, sql, begin, end, var, type,
oracle, an immediate preprocessor command, a C token, create,
function, package, procedure, trigger, or, replace,

Syntax error at line 42, column 2, file /home/corelogic/sunstudio12.1/prod/include/CC/stlport4/vector:
Error at line 42, column 2 in file /home/corelogic/sunstudio12.1/prod/include/CC
/stlport4/vector
#endif
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

a numeric constant, newline, define, error, if, ifdef,
ifndef, include, line, pragma, undef,
an immediate preprocessor command, a C token,
The symbol "define," was substituted for "endif" to continue.

Error at line 301, column 5 in file dbiadllogin.pc
EXEC SQL SELECT usr_id,
....1
PLS-S-00201, identifier 'USER_PROFILE' must be declared
Error at line 301, column 5 in file dbiadllogin.pc
EXEC SQL SELECT usr_id,
....1
PLS-S-00000, SQL Statement ignored
Semantic error at line 301, column 5, file dbiadllogin.pc:
EXEC SQL SELECT usr_id,
....1
PCC-S-02346, PL/SQL found semantic errors
make: *** [dbiadllogin.o] Error 1

It seems it is trying to precompile several header files as well when there is no real need to do it
as this is precompilation(conversion from .pc to .c),header files should not come into the picture.
We have commented out all the header files in .pc file and then it gets successfully converted to .c file.

Is there any such option that should be given to the Pro C compiler which should make it ignore all the header files?
Is the problem with the sys_include parameter?How should it be set?

Any help would be appreciated...

Thanks
Akshay
Re: Pro C files not converting from .pc to .c [message #572043 is a reply to message #572007] Wed, 05 December 2012 08:51 Go to previous message
dws1
Messages: 15
Registered: July 2012
Junior Member
Pro*C probably doesn't understand the syntax you're trying to use. It has quite an old C parser and doesn't try to keep abreast of all valid C syntax; the main aim is to translate EXEC SQL statements into some code.

Does it work OK if you use either #include <stdio.h> or #include "stdio.h"? If so then this would show the syntax #include SOME_SYMBOL(some_header.h) is the problem.
You could try wrapping the #includes with #ifndef ORA_PROC/#endif, which might stop it trying to grok your syntax, i.e.:
#ifndef ORA_PROC
#include $whatever!!fancy&^%&£syntax%$£%"£%^&£%&%you^£&%$%"£!"£$want(header.h)
#endif

There is no command-line option you can give that will enhance Pro*C's C parser.
Previous Topic: calling procedure from PRO C
Next Topic: (ERROR) FAN - Fast Application Notification
Goto Forum:
  


Current Time: Thu Mar 28 10:29:06 CDT 2024