C compilers for I4GL
Posted in 1995
>Date: Fri, 16 Jun 95 10:42:58 PDT >From: Calvin Ng <calvinng@technet.sg> >X-Informix-List-Id: <list.6617> > >Is there a way to specify the compiler to use when using INFORMIX-4GL C Compiled >version?? > >I understand it always look for "cc" in most platform. But my client would >actually like to use gcc. > >I assume an alternative would be to make a softlink for "cc" to point to "gcc", >maybe?? > >The FAQ does not say much in this area, such as using alternative C compiler for >Informix tools, eg using "gcc" for ESQL/C, C4GL... etc. Probably because there isn't all that much to say. In releases prior to 4.12, there was no way to change the C compiler short of hacking the c4gl script, and that did not affect the i4gl programmer's environment. With 4.12 and 6.00, the c4gl script is used by i4gl, so any changes there affect both ways of compilation. More importantly, the 4.12 and 6.00 c4gl scripts recognize the CC environment variable and use the C compiler so specified, defaulting to cc on most platforms. With 4.13, 6.01 and later versions (4.14 and 6.02 are in the pipeline), the environment variable INFORMIXC, which is used by the ESQL/C compiler scripts, is also acknowledged. The precedenced is compiler=${INFORMIXC:-${CC:-cc}} -- $INFORMIXC, or $CC, or cc. Also, all versions of I4GL from 4.12 onwards accept the C4GLFLAGS environment variable as a set of flags to be handled by the c4gl script. These are always overridden by the command line arguments. So, if you aren't using 4.12 or a later version, it is time to upgrade. Otherwise, you can definitely set CC to achieve the required result. Note that if you use a compiler other than the one used by Informix to build the software, there might, just conceivably, be problems. Most likely not. FWIW, the 6.02 and 4.14 release will have header files which declare (with prototypes) the functions used by I4GL. This is to allow you to compile the software with fussier compilers (gcc springs to mind). Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>