Compile my Programs
Compile using 'HydraStudio'
In 'HydraStudio', you can compile single files or build complete programs.
To Compile a Single File
In the project tree, right click the corresponding file and choose 'Compile'.
To Build a Program (Incremental)
In the project tree, right click the program filename and choose 'Build' from the context menu.
To Rebuild a Program
In the project tree, right click the program filename and choose 'Rebuild' from the context menu.
Compile Using the Command Line
On Unix/Linux platforms, it is possible to compile from the command line. There are a number of key tools for this job:
- 4make
A wrapper utility for all your compilation needs - fglc
The 4GL cross compiler - fmpc
The 4GL forms pseudo compiler - msgc
The message compiler - q4gl
The interactive clone of the Informix I4GL utility
Compiling with 4make
4make uses files with a .def extension to define how to build your 4GL programs. The format of a .def file is straight forward, and broken into a number of sections:
- TARGET
The name of the program/library to be built - SOURCES
A list of the source 4GL/C files for this program - FORMS
(optional) A list of the form files used for this program - MSG
(optional) A list of the message files for this program
An example .def file
TARGET=d4
SOURCES=d4_globals.4gl
d4_main.4gl
d4_customer.4gl
d4_order.4gl
d4_report.4gl
FORMS=custform.per
orderform.per
statelist.per
Compiling the .def file
To compile a program defined in a .def file, you will need to pass the name of the TARGET to 4make. In the example above, the name of the target is 'd4', so we call 4make with 'd4' as an argument:
4make d4