Re: ESQL/C Preprocessor
Posted in 1993
Topics: High Availability & Replication, Connectivity: ESQL/C, 4GL & Embedded SQL
> From: clawton@tfs.com (Chris Lawton) > Subject: ESQL/C Preprocessor > Date: 8 Oct 93 07:50:30 GMT > X-Informix-List-Id: <news.4539> > > > I'm having a problem with the esql/c preprocessor. > ... > BUT, (here's the problem/bug) the esql compiler will report: > esqlc: "../../../headers/hdr1.h", <last line #>: Error -33062: Missing ENDIF. > Chris, Your post caught me scratching my head trying to decide where I'd seen this one before. This sounds similar; perhaps the same cure will work. Not sure if this would be classed as a bug or not, though. ================================================================================ TechInfo # 1068 Short Description: Why can I not use #DEFINES in ESQL/C? Long Description: From mail dated July 27, 1991: QUESTION: ========= Why is the following illegal? #DEFINE x 1024 $CHAR sql_cmd[x] ANSWER: ======= The esql preprocessor looks at the above statement and sees the # sign. It thinks that this is a comment and strips it from the program. This way it is not defined when it goes through the C compile. To get around this problem you can run the program through 'cpp', the C preprocessor, which will substitute in the value for the #DEFINE and #INCLUDE lines. Then you can use ESQL to compile the program as normal. ================================================================================ Basically, what I'm saying is that the #endif will be treated as a comment, yeilding the same results as this tech info article discusses. Let me know if it helps, please! David Coburn coburn@informix.com Informix Software, Inc. ...uunet!infmx!coburn ========================================================================= Any opinions expressed here are not necessarily those of Informix (or for that matter, anybody else). =========================================================================