RE: 4GL on HPUX: compile problems
Posted in 1998
---------- David Coburn wrote: > > Howdy. I'm migrating lots of 4GL code from an old Sequent/Unisys machine > with 4GL 4.x to HPUX 10.20 and 4GL 6.x (sorry, no exact version numbers > right now, but these should be close enough). Everything is fine until I > get to one section of code that has embedded ESQL/C code in it. The > problem is that when compiled and run I get a -404 error, or "Statement not > available." (The error indicates that the statement has been previously > freed in the code. This is (a) not true because the preceeding two > statements did the declare and prepare; and (b) the cursor name is unique > in the source, so I don't think it is getting confused with an earlier > cursor name.) > > Tech support suggests that I'm running the wrong version of ESQL/C (7.10 or > so) for the 4GL; given the disparity in version numbers I don't find this > hard to believe. > > Their suggestion was to use the 4GL compiler to compile the ESQL/C, but > when I try this the preprocessor refuses to include my standard Informix > header, sqlca.h. I have made sure that the path for Informix include files > is in the c4gl command (by adding -I$(INFORMIXDIR)/incl to the c4gl compile > statement but it appears to ignore the directive. (Indeed, in reading the > c4gl script I find that -I is ignored instead of being passed on.) JL: I think there's a macro in sqlca.h (such a SQLCA_INCL) which prevents it from being included multiple times. Add that to the command line: c4gl -c -DSQLCA_INCL file.ec That should prevent problems... Maybe... Using c4gl to compile the ESQL/C code which will go into an I4GL program is the only (repeat *only*) reliable way of getting the correct compilation. Yours, Jonathan Leffler (jleffler@visa.com)