Compile programs


Compile with HydraStudio

  • Compile a single file:
    In the project tree, right-click the corresponding file and choose ‘Compile’.
  • Build a program (incremental):
    In the project tree, right-click the program filename and choose ‘Build’ from the context menu.
  • Rebuild a program:
    In the project tree, right-click the program filename and choose ‘Rebuild’ from the context menu.

Compile with 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

Compile with 4make

4make uses files with a .def extension to define how to build your 4GL programs. The format of a .def file is straightforward, 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

Sample .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

Compile the .def file

To compile a program defined in a .def file, 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