Pro*c compilation error
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Pro*c compilation error

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Posts
    3

    Pro*c compilation error

    Hi guys,

    I am using oracle 10g, proc 10.2.0.1.0.
    I am having a strange problem. I don't know wheather its a env problem or installation problem or the behaviour of proc on the two platforms (HP-UX11 and Linux RHEL4 ).

    I have Oracle 10g installed on HP-UX and RHEL4 Linux. Now the *.pc files compile fine on HP-UX, but they produce lots of errors on Linux :(

    Can't understand why.

    On HP-UX i am using cc compiler and on Linux gcc-3.4.6 compiler .

    If anybody got any idea .. please reply ...

    The error messages in Linux area as follows :

    [quote title=Quote:]Syntax error at line 200, column 23, file incident.pc:
    Error at line 200, column 23 in file incident.pc
    static MisIncidentRec *misInciRecords = NULL; /*Global pointer for all the Inc
    ident records*/
    ......................1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

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

    Syntax error at line 203, column 28, file incident.pc:
    Error at line 203, column 28 in file incident.pc
    static MisUpdateIncidentCb InciCallbacks[MIS_MAX_INCI_CALLBACKS];
    ...........................1
    PCC-S-02201, Encountered the symbol "InciCallbacks" when expecting one of the fo
    llowing:

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

    Syntax error at line 213, column 52, file incident.pc:
    Error at line 213, column 52 in file incident.pc
    static void UpdateGlobalCopyOnInsert(MisIncidentRec* pIncidentRec);
    ...................................................1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

    , )
    [/quote]

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    You have header files missing.

    Copy all the header files where this programs compiles correctly over to the linux box.

    regards
    Hrishy

  3. #3
    Join Date
    Oct 2007
    Posts
    3
    hmm... header files from $ORACLE_HOME/precomp/public ??? if some others are also neede let me know ...

  4. #4
    Join Date
    Oct 2007
    Posts
    3
    just copying the headers didn't helped dude .... i actually did some more tweaking to reach this result .... i was having a header file named incident.h in which i did precompilation ... i will show just how ...

    original header file text
    #ifndef INCIDENT_H
    #define INCIDENT_H

    static char incident_h[] = "@(#)\t$Header: /usr/users/tmsadmin/tms_e_r511f/adm/wr/mis/include/RCS/incident.h,v 1.32 2002/05/08 10:16:20 insu Exp $";

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    #define MIS_INC_NO "incident_No"
    #define MIS_INC_TYPE "incident_Type"
    #define MIS_INC_ITEM "item"
    #define MIS_INC_AUTO_INITIATED "auto_initiated"
    #define MIS_INC_TRAIN_DESC "train_describer"
    #define MIS_INC_STATION "station"
    #define MIS_INC_SITE_VERSION "site_version"
    #define MIS_INC_DELAY "delay"
    #define MIS_INC_OCCURTIME "occurred_At_Date_Time"
    #define MIS_INC_LOGINTIME "logged_At_Date_Time"

    .......

    typedef struct
    {
    Id incidentNo; /*Incident Number*/
    MisTrainDesc trainDesc; /*Service Number affected by the Incident*/
    Ename station; /*Incident Occurrence Location*/
    Ename siteVersion; /*the name of the Site*/
    PrIncidentTypeEnum incidentType; /*Type of Incident i.e whether it is a
    **Speeding inci.,delay inci,etc.*/
    int delay; /*The delay caused to the service No*/
    Id item; /*the item that can be associated with
    **this incident*/
    Bool autoInitiated;/*indicates whether the Incident is
    **Auto_Initiated or not
    **1 indicates AUTO INITIATED and
    **0 indicates the Incident is
    **not auto-initiated but
    **is operator generated*/
    MisDateTime timeOfLogging; /*date-time at which
    **the Incident was
    **logged in*/
    MisDateTime timeOfOccurrence;/*date-time of
    **occurrence of
    **Incident*/
    MisDateTime timeOfRecovery;/*date-time at
    **which the Incident
    **was recovered from */
    MisTmsDateTime occurredAt; /* Time of incident occurence in TmsDate & TmsTime format */
    }MisIncidentRec;

    .........
    #endif
    while header file was like this it gave errors as

    Generating Makefile.d
    ln -fs /home/tmsadmin/tms/include/error.h error.h
    proc LINES=YES CODE=ANSI_C HOLD_CURSOR=NO RELEASE_CURSOR=NO MODE=ORACLE DEFINE=ORACLE10 SQLCHECK=SEMANTICS USERID=mis/mis@skoda INCLUDE=. INCLUDE=/home/ankur/tms/adm/wr/mis/include INCLUDE=/home/tmsadmin/tms/adm/wr/mis/include INCLUDE=/home/ankur/tms/mis/include INCLUDE=/home/tmsadmin/tms/mis/include INCLUDE=/home/ankur/tms/adm/wr/include INCLUDE=/home/tmsadmin/tms/adm/wr/include INCLUDE=/home/ankur/tms/include INCLUDE=/home/tmsadmin/tms/include INCLUDE=/home/ankur/tms/local/include INCLUDE=/home/tmsadmin/tms/local/include INCLUDE=/home/ankur/tms/include/compat/Linux INCLUDE=/home/tmsadmin/tms/include/compat/Linux INCLUDE=/u02/app/oracle/product/10.2.0.1.0/precomp/public INCLUDE=/home/ankur/tms/include INCLUDE=/home/tmsadmin/tms_e_r511f_bin/local/include/ INCLUDE=/usr/X11/include INCLUDE=/usr/include iname=blockingTrainInfo.pc

    Pro*C/C++: Release 10.2.0.1.0 - Production on Thu Oct 25 16:51:57 2007

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

    System default option values taken from: /u02/app/oracle/product/10.2.0.1.0/precomp/admin/pcscfg.cfg

    Syntax error at line 206, column 5, file /home/ankur/tms/adm/wr/mis/include/incident.h:
    Error at line 206, column 5 in file /home/ankur/tms/adm/wr/mis/include/incident.
    h
    PrIncidentTypeEnum incidentType; /*Type of Incident i.e whether it is a
    ....1
    PCC-S-02201, Encountered the symbol "PrIncidentTypeEnum" when expecting one of t
    he 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 "PrIncidentTypeEnum" to continue.

    Syntax error at line 235, column 51, file /home/ankur/tms/adm/wr/mis/include/incident.h:
    Error at line 235, column 51 in file /home/ankur/tms/adm/wr/mis/include/incident
    .h
    typedef void (*MisUpdateIncidentCb)(MisIncidentRec* pOld,
    ..................................................1
    PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

    , )

    Syntax error at line 237, column 25, file /home/ankur/tms/adm/wr/mis/include/incident.h:
    Error at line 237, column 25 in file /home/ankur/tms/adm/wr/mis/include/incident
    .h
    AlertReasonType misAlertReason);
    ........................1
    PCC-S-02201, Encountered the symbol "misAlertReason" when expecting one of the f
    ollowing:

    ; , = ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&=
    so i excluded some typedefs and defines as as follows :

    #ifndef INCIDENT_H
    #define INCIDENT_H
    #ifndef ORA_PROC
    static char incident_h[] = "@(#)\t$Header: /usr/users/tmsadmin/tms_e_r511f/adm/wr/mis/include/RCS/incident.h,v 1.32 2002/05/08 10:16:20 insu Exp $";

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    #define MIS_INC_NO "incident_No"
    #define MIS_INC_TYPE "incident_Type"
    #define MIS_INC_ITEM "item"
    #define MIS_INC_AUTO_INITIATED "auto_initiated"
    #define MIS_INC_TRAIN_DESC "train_describer"
    #define MIS_INC_STATION "station"
    #define MIS_INC_SITE_VERSION "site_version"
    #define MIS_INC_DELAY "delay"
    ........
    #endif
    #endif
    this is read somewhere and by doing this atlest the above error was gone ... but now the error (in my first post) comes ....

    so this is the whole matter .... if any help pls do it :(

  5. #5
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Can you zip and attach the incident.pc file here

    regards
    Hrishy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width