Was this helpful?
How to Build ESQL/C-Plus-Plus Programs
To build an ESQL/C++ program, you must precompile the ESQL/C++ source into a C++ program, compile the resulting C++ program, and link it with the Ingres runtime library.
To precompile ESQL/C++ programs, use the esqlcc command. The default extension for ESQL/C++ source files is .scc. The default extension for the C++ file generated by the precompiler is .cc.
The syntax of the C++ precompiler command is:
esqlcc flags filename
where filename is the name of the file containing the ESQL/C++ source for your application, and flags are one or more of the flags described in Command Line Operations in the Preprocessor Operation section, or the following ESQL/C++ flag:
-extension = ext
This flag specifies the extension for the C++ file created by the precompiler.
To display a list of valid ESQL/C++ precompiler flags, issue the esqlcc command with no arguments.
To compile and link the resulting C++ program, invoke your C++ compiler. You must link the program with libingres.a (the Ingres runtime library). The following example illustrates the commands you must issue to build an ESQL/C++ application named inventory:
esqlcc -extension=cpp inventory.scc
CC -c inventory inventory.cpp
CC -o inventory inventory.o \
$II_SYSTEM/ingres/lib/libingres.a -lC
Last modified date: 06/10/2024