Re: Urgent (Pro*C++)

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 04 Mar 2008 11:21:05 GMT
Message-ID: <1204629634.94251@proxy.dienste.wien.at>


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.

Yours,
Laurenz Albe Received on Tue Mar 04 2008 - 05:21:05 CST

Original text of this message