Re: Preprocessing C++ With ESQL/C?
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Internationalization & Character Sets
In <458kqj$jnc@cssun.mathcs.emory.edu>, pp@ciop.waw.pl wrote: > On Mon, 2 Oct 1995, Alexander J. Oss wrote: > > > 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?) > > We did that some time ago. We simply put all dbase access functions > in a C module, compiled with cc which was later linked with the rest > of our C++ application. My last project did it directly. We compiled with a shell script that changed the suffix to ".C" when appropriate. (If you use a suffix other then ".ec", you can recognize that it's S.Q.L. embedded in C++. The script can change the suffix to ".ec" on the fly so that the E.S.Q.L. compiler accepts the file.) For that matter, many C++ compilers accept .c as a suffix for C++ source. You'll also need a header file of prototyped S.Q.L. function declarations (with extern "C" of course). That's a nuisance, but so far as I know Informix E.S.Q.L. supports neither Standard C nor C++. (Informix is badly behind the times on this.) Lastly, your C++ source must look superficially like C code. No C++ //comments, and no host variables in function declarations. The compiler doesn't understand prototyped function declarations. -:- "Would you eat a doormat that lives on bark and fungus?" "Wombats: A Pictorial Essay," in _Risks Digest_ -- Col. G. L. Sicherman gls@hrcms.ATT.COM