Linking shared Informix® general libraries to an ESQL/C module
About this task
To link shared HCL Informix® general libraries to an ESQL/C module:
Procedure
- Set the environment variable that specifies the library
search path at run time so that it includes the $INFORMIXDIR/lib and $INFORMIXDIR/lib/esql paths
on a UNIX™ operating system;
and %INFORMIXDIR%lib in a Windows™ environment.On many UNIX™ operating systems, the LD_LIBRARY_PATH environment variable specifies the library search path. The following command sets LD_LIBRARY_PATH in a C shell:
setenv LD_LIBRARY_PATH $INFORMIXDIR/lib:$INFORMIXDIR/ lib/esql:/usr/libIn Windows™ environments, use the following command:set LIB = %INFORMIXDIR%\lib\;%LIB% - Compile your program with the esql command.
To link shared Informix® general libraries with the module, you do not need to specify a command-line option. links shared libraries by default. The following command compiles the file.ec source file with shared Informix® libraries:
esql file.ec -o file.exe
Results
The esql command also uses the symbolic name when it links the thread-safe shared Informix® general libraries with the application.