Compilers command line options

Preprocessor options can be used with fglcomp and fglform compilers.

File inclusion path

The -I option defines a path used to search files included by the &include directives:

 -I path

Macro definition

The -D option defines a macro with the value 1, so that it can be used conditional directives like &ifdef:

 -D identifier
The -U option undefines a macro. The macro will not be defined, even if it is defined with the -D option later in the command line, or when it is defined in the code with a &define directive:
 -U identifier

However, predefined macros such as __LINE__ can't be undefined with the -U option.

Preprocessing only

 -E

By using the -E option, only the preprocessing phase is done by the compilers. Result is dumped in standard output.

Preprocessing options

 -p [nopp|noln|fglpp]

When using option -p nopp, it disables the preprocessor phase.

By using option -p noln with the -E preprocessing-only option, you can remove line number information and unnecessary empty lines.

By default, the preprocessor expects an ampersand '&' as preprocessor symbol for macros. The option -p fglpp enables the old syntax, using the sharp '#' as preprocessor symbol. The sharp '# ' syntax is not compatible with single-line comments.

Examples

fglcomp -E -D DEBUG -I /usr/sources/headers program.4gl
fglcomp -E -p fglpp -I /usr/sources/headers program.4gl
fglcomp -E -p nopp -I /usr/sources/headers program.4gl