2. Embedded SQL for C : Preprocessor Operation : How Embedded SQL Programs are Linked--UNIX : Programs Without Embedded Forms
 
Share this page                  
Programs Without Embedded Forms
The following example demonstrates the link command of an embedded SQL program called dbentry that was preprocessed and compiled.
cc -o dbentry dbentry.o\
 $II_SYSTEM/ingres/lib/libingres.a \
-lm -lc ‑lpthread ‑lcrypt ‑ldl ‑lrt
You must include both the math library and the C runtime library.
Ingres shared libraries are available on some UNIX platforms. To link with these shared libraries replace libingres.a in your link command with:
-L $II_SYSTEM/ingres/lib -linterp.1 -lframe.1 -lq.1 \
     -lcompat.1
To verify if your release supports shared libraries check for the existence of any of these four shared libraries in the $II_SYSTEM/ingres/lib directory. For example:
ls -l $II_SYSTEM/ingres/lib/libq.1.*