var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
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
all these errors point on the first line containing the 'EXEC'
statement (any 'EXEC' statement 'INCLUDE' or 'BEGIN DECLARE SECTION')
in the file
thanx in advance
Re: vc++ error while compiling pro*c precompiled code
In this case you have to include SQLCA structure, i hope.
Pls add the following line in your program before EXEC statement.
EXEC SQL INCLUDE SQLCA;
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...
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