Problems compiling 32 bit code with ESQL/C, Online V6, Visual C++
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Problems compiling ESQL generated C files in Visual C++ 4.0 ? ------------------------------------------------------------- Engine: Online V6.00.UE1 on HP-UX 9000/800 E25 Tools: ESQL/C V5.01? on WFW3.11 and Windoze 95 Visual C++ V1 and V4 on WFW3.11 and Windoze 95 Foxpro 2.6 and Visual Foxpro on WFW3.11 and Windoze 95 Background ---------- Currently we have embedded C code, used successfully to generate Fox Pro dynamic link librarys (FLLs) - thus allowing Fox Pro 2.6 to access Informix Tables. The FLLs are generated using Informix 6.0 windows compatible ESQL precompiler and Microsoft Visual C++ 1.0. Senario ------- We are now upgrading to Visual Fox Pro and this requires the FLL to be 32 bit compatible so it must be compiled under C++ 2.0 or higher. Unfortunately the code generated by the ESQL precompiler is not compatible with C++ 4.0. Although is it possible to call 16 bit DLLs from a 32 bit application use a programming technique called Thunking, this seems too technical and time consuming. Is there any alternative? Is it neccessary to use the Windows NT compatible ESQL pre-compiler ? C++ Compiler Problems --------------------- Currently when we attempt to compile an ESQL precompiled c file under C++ 4.0 the compiler issues various warnings and errors. We are including the C++ compatible header file included with Informix 6.0. Here is a typical problematic compiler output: --------------------Configuration: CSSlibs - Win32 Debug-------------------- Esql c Precompiler INFORMIX-ESQL Version 5.01.WC1 \\Msdev\\Projects\\fll_srce\\cssfuncs.ec Compiling... cssfuncs.c C:\\Msdev\\Projects\\CSSlibs\\cssfuncs.c(4) : error C4226: nonstandard extension used : '_pascal' is an obsolete keyword C:\\Msdev\\Projects\\CSSlibs\\cssfuncs.c(4) : error C2373: '_iqnprep' : redefinition; different type modifiers \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(88) : error C2373: 'strrchr' : redefinition; different type modifiers \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(89) : error C2373: 'strchr' : redefinition; different type modifiers \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(293) : warning C4013: 'countfields' undefined; assuming extern returning int \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(299) : warning C4013: '_Hlock' undefined; assuming extern returning int \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(306) : warning C4013: 'trim' undefined; assuming extern returning int \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(426) : warning C4244: '=' : conversion from 'long ' to 'short ', possible loss of data \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(439) : warning C4013: 'startstr' undefined; assuming extern returning int \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(451) : warning C4013: 'buildstr' undefined; assuming extern returning int \\Msdev\\Projects\\fll_srce\\cssfuncs.ec(1634) : warning C4013: '_strcpy' undefined; assuming extern returning int Error executing cl.exe. CSSlibs.dll - 4 error(s), 7 warning(s) 1st Error occurs on the following line -------------------------------------- extern _SQCURSOR far *_far _pascal _iqnprep(char far *,char far *,short); Any help greatly appreciated. Responses via email to vince@aethos.demon.co.uk will be summarized. TIA.