Compiling ESQL/C with C++?
Posted in 1993
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I have inherited some ESQL/C code (I'm totally new to Informix) and just tried using my C++ compiler to compile the C code generated by ESQL. Consider the following errors: "miscDB.ec", line 220: warning: old style definition of MiscDBFetchFixedList() (anachronism) "miscDB.ec", line 239: error: undefined function _iqnprep called "miscDB.ec", line 239: error: bad pointer initializer: bad operator in constant expression "miscDB.ec", line 239: error: bad assignment type: _SQCURSOR* = int "miscDB.ec", line 246: error: unexpected 1 argument for _iqlocate_cursor() "miscDB.ec", line 246: error: undefined function _iqdescribe called "miscDB.ec", line 262: error: undefined function rtypwidth called "miscDB.ec", line 277: error: unexpected 1 argument for _iqlocate_cursor() "miscDB.ec", line 277: error: unexpected 1 argument for _iqlocate_cursor() "miscDB.ec", line 277: error: undefined function _iqcddcl called "miscDB.ec", line 285: error: unexpected 1 argument for _iqlocate_cursor() "miscDB.ec", line 285: error: undefined function _iqdcopen called "miscDB.ec", line 315: error: unexpected 1 argument for _iqlocate_cursor() "miscDB.ec", line 315: error: undefined function _iqcftch called "miscDB.ec", line 370: error: unexpected 1 argument for _iqlocate_cursor() The first warning is because my MiscDB... function is declared using non-ANSI syntax. According to the ESQL manual I'm stuck with this because "ANSI C function syntax is not currently supported." A bad omen. Next there are lots of undefined functions being called, which are Informix library functions. Are there some header files somewhere that I can include which have proper ANSI compliant function prototypes for these? The big question is: Is it possible to use ESQL with C++? Is anyone doing it? What is the secret? Sorry if I sound like a newbie. I am, to both informix and C++. Also sorry if this is a FAQ. I haven't been reading this group. -- Todd Chesney, AG Communication Systems Phoenix AZ. - UUCP: ncar!noao!enuucp!gtephx!chesneyt - Internet: chesneyt@agcs.com Work: (602) 582-7216 Home: (602) 566-1021