Re: Urgent (Pro*C++)
Date: 04 Mar 2008 11:21:05 GMT
vihangtole_at_gmail.com <vihangtole_at_gmail.com> wrote:
> I am unable to compile my Pro*C++ program when i declare any host
> variables/structures in header files. It seems that Pro*C++ only
> accepts declaration placed inside the block
> EXEC SQL BEGIN DECLARE SECTION;
> EXEC SQL END DECLARE SECTION;
> But EXEC SQL statement are not allowed inside header files. Therefore
> i am forced to include host structure / variable definitions in the
> main program.
> But i want to access these structure across different programs. I am
> forced to include these definitions in each program as i cant include
> them inside header file.
> Pro*C allows you to declare host structure / variables anywhere
> (header files / program).
> But i think Pro*C++ has above mentioned restriction.
> Is there any way out???
I haven't tried it, but maybe the EXEC SQL INCLUDE can help you.
According to the documentation, it will include the header file into the C source during the precompile step, so you can have any embedded SQL statements in a file that is included that way.
Laurenz Albe Received on Tue Mar 04 2008 - 05:21:05 CST