Re: Preprocessing C++ With ESQL/C?
Posted in 1995
In article <NEWTNews.812630716.31762.alex@alexpc.films.com>, alex.oss@films.com says... >I'm thinking that I'd like to do a significant part of our system's >development with C++. However, it seems that ESQL/C only generates files with >a suffix of ".c". Has this caused anybody any trouble? (Is anyone working in >C++ with ESQL/C in the first place?) Before you get that far, you may have some other difficulties. ESQL/C cannot use variables defined in Ansi-standard function definitions. Eg, int load_id(EXEC SQL int id) cannot be used by ESQL/C; you have to use the int load_id(id) EXEC SQL int id; method, or you have to locally declare the variables and copy them. As long as the variables you're using with ESQL/C are not declared like this, and as long as you do not use C++ classes directly with ESQL statements, you should be okay. Er, that is, if your C++ compiler allows its input to come from .c files, and as long as you manually declare in your own C++ header files all the internal Informix function calls to the database (_iqslct(), _iqlocate_cursor(), _iqclose(), etc.), and as long as you work around anything else that I've forgotten to mention. Does Informix 6 or Informix 7 make any improvements to ESQL/C, like usable macros, greater understanding of variable scoping, ability to handle Ansi-standard C code, or C++ functionality? -- William Harris william@carsinfo.com CARS Information Systems http://www.carsinfo.com/~william/ 4000 Executive Park Drive Cincinnati, OH (USA) 45241