Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004

    Unanswered: vc++ error while compiling pro*c precompiled code

    i'm using pro*c to precompile my c++ code which accesses oracle 9i
    database, i'm running a oracle 9i client on my system

    on compiling the c++ file (generated by pro*c)i'm getting following

    E:\CODE\VariableRating.cpp(712) : error C2146: syntax error : missing
    ';' before identifier 'SQL'
    E:\CODE\VariableRating.cpp(712) : error C2501: 'EXEC' : missing
    storage-class or type specifiers
    E:\CODE\VariableRating.cpp(712) : fatal error C1004: unexpected end of
    file found

    all these errors point on the first line containing the 'EXEC'
    statement (any 'EXEC' statement 'INCLUDE' or 'BEGIN DECLARE SECTION')
    in the file

    plz help

    thanx in advance


  2. #2
    Join Date
    Feb 2004

    Re: vc++ error while compiling pro*c precompiled code

    Hi harsh

    In this case you have to include SQLCA structure, i hope.

    Pls add the following line in your program before EXEC statement.



  3. #3
    Join Date
    Feb 2004

    solved the prob!!!

    hi it's harsh agn,

    i'm pleased to mention tht i have solved my problem last nite,

    i'm posting the solution to share with all those interested.

    actually i had declared a few host variables using the Pro*C 'EXEC' command in the corresponding header file.

    the header file was (just) included (word by word) in the source file during precompilation but not precompiled itself.

    as a result the 'EXEC' statements were not executed (and commented out) during precompilation. thus VC++ was finding unrecognized identifiers n all...

    now i remember what i read quite some bak in pro*c docs that we must not place any Pro*C commands in any included file.

    hope it explains...

    neway thanx

    harsh :-)

  4. #4
    Join Date
    Feb 2004
    ya it's harsh agn...

    i'd like to add that the include files were givin probs coz they were bein multiply included...

    so we dont have to place proc statements in files tht are bein multiply included in the application through different paths...

    with best wishes

Posting Permissions

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