Pro*C++ and global variables.

From: Atul Pinge <apinge_at_carl.org>
Date: 26 Oct 2001 10:07:19 -0700
Message-ID: <5939461c.0110260907.6276c734_at_posting.google.com>



[Quoted] Hello everybody,

I started working with Pro*C++ preprocessor and it's turning out to be quite a nightmare. Looks like the preprocessor generates global variables in the file where we are using EXEC SQL statements. So does that mean that you are allowed to use all the EXEC SQL statements only in one source file? Because otherwise, I get "This global variable already defined" kind of errors. Also, looks like the preprocessor can look at variables defined between EXEC SQL BEGIN DECLARE SECTION and EXEC SQL END DECLARE SECTION. So does that mean that I cannot define any variable inside .h file where class is declared? Because if it is going to generate global variables in .h file then every place the .h file is included the global variables are going to get defined again. Is there a solution to this problem?

Thanks in advance.
Atul Received on Fri Oct 26 2001 - 19:07:19 CEST

Original text of this message