Re: Dynamic-4gl runner
Posted in 1998
On Thu, 9 Jul 1998, Candy McCall wrote:
> When trying to run an application I get the database error -408
> (occurs when database statement is encountered). So, I tried to
> rebuild the runner using the fglmkrun command and I get the message:
>
> $ fglmkrun
> Build /usr/fgl2c/bin/fglrun <<without>> c extentions.> fatal error: library not found: -lfesql
> Build of /usr/fgl2c/bin/fglrun failed
>
> I now recall that I received this error upon installing the product. I'm
> running SCO Openserver with an Informix Development 7.20 UD1.
>
> Any help would be greatly appreciated.
You haven't got your environment set up properly yet, which is unfortunate;
this should have been resolved during the install process.
Which C compiler do you use? You should consider setting FGLCC, CC and
INFORMIXC before doing much else unless you are using the default cc
compiler. On SCO, I think you tend to be using icc or rcc (or gcc, of
course).
Next, you need to run the findlib.sh script in $FGLDIR/bin. Before yoo do
that, you need to ensure that your environment is set up so that you can
compile ESQL/C programs successfully. You may need to set the FGLDBS
environment variable to ix711 (denoting a 7.x product). This should create
envf4gl and envf4gl.csh for you. You can check whether that references
-lfesql or not -- it shouldn't -- in the FGLLIBSQL variables. Assuming
that is fixed, you can then establish the correct environment by 'source
envf4gl.csh' or '. envf4gl'. After that, your fglmkrun should work.
I wasn't aware that running it with no arguments did the build in $FGLDIR;
I assumed you needed to do:
fglmkrun -o fglrun $FGLDIR/lib/fglExt.c
General tip: before you install D4GL, ensure that you have a working ESQL/C
development environment set up. If you can't compile and run a program
such as the following, then you need to fix up your environment until you
can. This might mean installing the GCC from the CD. The envgcc.sh script
which is generated will clobber your SHELL variable (as does the default
envf4gl script -- I edit mine to leave SHELL alone), but will tell GCC
where to find its support files. You should set INFORMIXC=$GCC if you use
this; the main D4GL install won't work unless you do so. It might also
mean installing an ESQL/C Development system, or an I4GL development system
(it can use the compilers from the I4GL c-code system instead of ESQL/C,
though the compilation below would then use c4gl in place of esql).
$ cat >kk.ec <<!
> int main(void)
> {> EXEC SQL WHENEVER ERROR STOP;
> EXEC SQL CREATE DATABASE obscure;
> EXEC SQL CLOSE DATABASE;
> EXEC SQL DROP DATABASE obscure;
> return 0;
> }
> !
$ esql -o kk kk.ec
$ ./kk
$
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix v0.59 -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn