client applications
You can compile and link a client application with the HCL® Informix® GLS libraries.
For information about how to write and compile client applications, see the HCL® Informix® DataBlade® API Programmer's Guide.
You must specify the location of the header file, ifxgls.h. This header file is located in %INFORMIXDIR%\incl\public for Windows™ and in $INFORMIXDIR/incl/public for UNIX™.
This directory also contains many of the other files that a client application uses. Therefore, it is an important directory to include when you compile the application.
sample.c that uses : cl -MD -Id:\msdev\include -Id:\informix\incl\public -Id:\informix\incl\esql \
-Id:\informix\incl -c sample.c| At link time (in lib subdirectory of INFORMIXDIR) | At run time (in bin subdirectory of INFORMIXDIR) | Purpose |
|---|---|---|
| libthdmi.lib | idmit09a.dll | functions |
| isqlt09a.lib | isqlt09a.dll | ESQL/C functions |
cc -I$INFORMIXDIR/incl/public -I$INFORMIXDIR/esql -I$INFORMIXDIR/incl -c sample.cThe preceding command checks to see whether the API client libraries have been installed in the directory that the INFORMIXDIR environment variable indicates.
- For the library location, use the following -L compiler option:
-L$INFORMIXDIR/lib/esql - For the library name, include the -lifgls command-line option.
sample:cc -o sample sample.o \
-L$INFORMIXDIR/lib/esql -L$INFORMIXDIR/lib/dmi -L$INFORMIXDIR/lib \
-lifdmi -lifsql -lifasf -lifcss -lifos -lifgen -lifgls -lifglx \
-lnsl -lsocket -laio -lm -ldl -lelf -lw \
$INFORMIXDIR/lib/esql/checkapi.oesql -o sample sample.o -L$INFORMIXDIR/lib/dmi -ldmi