Compiling and Executing the Program

BDL programs are made up of a single module, or modules, containing the program functions. You can compile and execute programs in Genero Studio or use command line tools if you prefer.

From Genero Studio

The Execute option in the Genero Studio Project view will compile and link files in the specified application node if necessary before executing the application. You can also compile individual modules or build an application (compile and link files) as independent steps.

To compile and execute the simple program in Genero Studio:

  1. In the Project view, expand the BDLTutorial project and find the chap02 group.
  2. Expand the chap02 group, right-click on the simple application node and select Execute.
This figure shows the Execute option used to compile, link and run the simple application. The program output, "Hello, world!", displays in the Output view.

Figure 1. Using the Execute option to compile and execute the simple program

From the command line

The following tools can be used to compile and execute the simple program from the command line.

  1. Compile the single module program:
    fglcomp simple.4gl
  2. Execute the program:
    fglrun simple.42m
Tip:

1. You can compile and run a program without specifying the file extensions:

fglcomp simple
fglrun simple
You can do this in one command line, adding the -M option for errors:
fglcomp -M simple && fglrun simple