Introduction to Genero BDL programming / Compiling a program |
Genero Business Development Language (BDL) provides a source code compiler named fglcomp, which generates hardware-independent pseudo-machine code (p-code). This code is not directly executable by the operating system: it is interpreted by the Genero BDL runtime system (a program named fglrun, and called "runner").
The compiled p-code modules are binary. The files are not printable or editable as text.
This tool compiles a program source module into a p-code version. The compiled module has an extension of .42m.
If a compilation error occurs, the text file filename.err flagging the errors is created. You can display directly the compilation errors by using the -M option.
fglcomp -M cust_main.4gl
fglrun cust_main.42m
If your program consists of more than one module, the modules can be linked together prior to execution, by the fgllink tool.
If possible, prefer the IMPORT FGL solution to define module dependencies, instead of linking programs.
The fgllink tool assembles multiple p-code modules compiled with fglcomp into a single .42r program or a .42x library.
fgllink -o cust_main.42r cust_data.42m cust_report.42m common_lib.42x
fglrun custmain.42r
fgllink -o common_lib.42x sql_utils.42m input_utils.42m report_utils.42m