Re: ESQL/C for C++ (prototypes)
Posted in 1991
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
> Has anyone used ESQL/C with C++ ? The problem seems to be that > you need to define prototypes for every function that you use, otherwise > you get compile (C++) time errors. > > So the question is: > Has anyone defined those prototypes for C++ in order to compile > code generated by esql/c successfully? I haven't actually done this for Informix-4GL (and ESQL/C), but I did it for Oracle's embedded SQL. Basically, I just created a header file that looked like: extern "C" { void _iqdclcursor(...); ... } This way, I didn't have to figure out the types of the parameters. I got the names of all the functions out of an nm listing on the library which was linked to. In Informix-ESQL/C's case, I believe this would be libsql.a in /usr/informix/lib. Then I went on to write C++ classes that directly called these functions, so I could avoid the embedded SQL entirely. One of these days, I intend to do the same for Informix-ESQL/C, mostly because I am growing tired of the limitations of 4GL. John Tamplin Xavax jat@xavax.COM 2104 West Ferry Way ...!uunet!xavax!jat Huntsville, AL 35801