Re: gcc With Informix 4GL
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
In article <2v0v52$2ti@panix.com> hjm@panix.com (Harry Mayer) writes: I am attempting to compile I4gl using the gcc compiler with no success. The links fail, the application compiles but cores when executed. I am using the stock "c4gl" script and substituting "cc" with "gcc". Could it be as simple as compiler options?? Any help would be appreciated. I am using gcc-2.5.8 with the c4gl from 4.10 on an RS-6000. The Informix libraries like to violate the ANSI C standard and write into string constants (Informix bug #22228). Here is my patch to c4gl that makes the whole thing work: *** /usr/informix/bin/c4gl Wed Dec 18 17:02:44 1991 --- /usr/local/bin/c4gl Mon May 9 15:02:41 1994 *************** *** 44,49 **** fi ! FGLC=${INFORMIXDIR=/usr/informix}/lib/fglc ! FGLC2=${INFORMIXDIR=/usr/informix}/lib/fglc2 STAT=0 TEMP=0 --- 44,50 ---- fi ! INFDIR=${INFORMIXDIR=/usr/informix} ! FGLC=$INFDIR/lib/fglc ! FGLC2=$INFDIR/lib/fglc2 STAT=0 TEMP=0 *************** *** 53,56 **** --- 54,58 ---- ANYFLG= BFLG= + L="$INFDIR/lib/lib4gl.a $INFDIR/lib/libnforms.a $INFDIR/lib/libfesql.a -lbsd" for F *************** *** 83,86 **** --- 85,91 ---- A="$A $FBASE.c" ;; + -c ) + L=$F + ;; -e ) DOEXIT=1; *************** *** 104,110 **** if [ $DOEXIT -eq 0 -a $STAT -eq 0 ] then ! INFDIR=${INFORMIXDIR=/usr/informix} ! exec cc -I$INFDIR/incl $A $INFDIR/lib/lib4gl.a \\ ! $INFDIR/lib/libnforms.a $INFDIR/lib/libfesql.a -lbsd else exit $STAT --- 109,113 ---- if [ $DOEXIT -eq 0 -a $STAT -eq 0 ] then ! exec gcc -fwritable-strings -I$INFDIR/incl $A $L else exit $STAT -- Ronald Cole E-mail: ronald@netcom.com Senior Software Engineer ronald@abysmal.chico.ca.us OPTX International zippy@ecst.csuchico.edu "The Bill Of Rights -- Void Where Prohibited By Law"