2 Replies Latest reply: Apr 18, 2012 11:38 AM by 931576 RSS

    PROC precompile issue for not support _Bool

    931152
      I'm using RHEL,

      system version
      [oracle@hiddenmachine tr]$ uname -a
      Linux hiddenmachine 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux


      proc version
      Pro*C/C++: Release 11.2.0.3.0 - Production on Tue Apr 17 18:07:10 2012


      the file content in $(ORACLE_HOME)/precomp/admin/pcscfg.cfg:
      sys_include=($ORACLE_HOME/precomp/public,/usr/include,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.5/include)
      ltype=short
      define=__x86_64__


      my pc file
      #include <curses.h>
      EXEC SQL INCLUDE SQLCA;

      int main() {                                                                   
      char hello[15];
      char *user = "the_user";                                                    
      char *password = "the_password";                                            
      char *sid = "the_sid";                                                      

      EXEC SQL CONNECT :user IDENTIFIED BY :password USING :sid;

      EXEC SQL
      SELECT 'Hello World' INTO :hello
      FROM DUAL;

      printf("%s\n", hello);

      EXEC SQL COMMIT RELEASE;

      return 0;
      }


      I compile this pc file with the following command:
      proc iname=main


      I get following errors, it should not be a include path issue, because Bool is a build-in type, there is none of head file will define Bool.
      IS there any solutions, thanks in advance!

      Pro*C/C++: Release 11.2.0.3.0 - Production on Tue Apr 17 18:10:42 2012

      Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

      System default option values taken from: /usr/oracle/product/11.2/precomp/admin/
      pcscfg.cfg

      Syntax error at line 374, column 2, file /usr/include/curses.h:
      Error at line 374, column 2 in file /usr/include/curses.h
      bool _notimeout;     /* no time out on function-key entry? */       
      .1
      PCC-S-02201, Encountered the symbol "_Bool" 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,

      Syntax error at line 0, column 0, file main.pc:
      Error at line 0, column 0 in file main.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 main.pc
      PCC-F-02102, Fatal error while doing C preprocessing
      PCC-W-02105, Unable to open list file