Linking an EQUEL Program - Linux
EQUEL programs require procedures from several Ingres libraries. The libraries required are listed below and must be included in your compile or link command after all user modules. The libraries must be specified in the order shown in the examples that follow.
Programs Without Embedded Forms
The following example demonstrates the link command of an EQUEL program called "dbentry" that has been preprocessed and compiled:
f77 -o dbentry dbentry.o \
$II_SYSTEM/ingres/lib/libingres.a \
-lm -lc
Note that both the math library and the C runtime library must be included.
Ingres shared libraries are available on some Linux 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.*
Programs with Embedded Forms
If your program includes embedded forms, you must link your program with some additional libraries. The following example demonstrates the link command of an EQUEL program called "formentry" that includes forms statements:
f77 -o formentry formentry.o \
$II_SYSTEM/ingres/lib/libingres.a \
-lm -lc
Note that both the math library and the C runtime library must be included.
Compiling and Linking Precompiled Forms
The technique of declaring a precompiled form to the FRS is discussed in the Embedded Forms Programming Guide. To use such a form in your program, you must also follow the steps described here. In VIFRED, you can select a menu item to compile a form. When you do this, VIFRED creates a file in your directory describing the form in C. VIFRED lets you select the name for the file. Once you have created the C file this way, you can compile it into linkable object code with the cc command:
cc filename
The output of this command is a file with the extension ".o". You then link this object file with your program by listing it in the link command, as in the following example, which includes the compiled form "empform.o":
f77 -o formentry formentry.o \
empform.o \
$II_SYSTEM/ingres/lib/libingres.a \
-lm -lc
Last modified date: 08/14/2024