Compilation

When Uniface development objects are compiled, the compiler checks the definition, syntax, and integrity of the object, inserts inherited ProcScript modules, resolves IncludeScript references and constant definitions, compiles the resulting code, and generates compiled runtime objects and descriptors. It can optionally generate files that show an object's ProcScript after inherited and included ProcScript has been resolved.

To compile objects, you can do any of the following:

  • In the Uniface IDE, click Compile or Compile & Test when editing a project, entity, component, or library. If you compile a project, it compiles all the objects it contains.
  • From the IDE command line, use one of the compilation switches to compile a specific type of object. For example, /dsp MUSIC* compiles all the Dynamic Server Pages that begin with MUSIC. For more information, see Compiling from the IDE Command Line.
  • If you create your own tools for maintaining applications, you can use the $ude("compile") ProcScript command. For more information, see $ude ("compile").

Note:  To compile any type of component, it must contain a component entity.

Compilation Messages

As compilation progresses, the Uniface compiler issues messages to show the progress of compilation and to indicate where it encounters problems or errors. If errors are encountered, these are always displayed.

Compilation messages are displayed in the Compiler Output tab in the Uniface IDE, or in the Uniface Transcript Window when compiling from the command line. Alternatively, you can direct Transcript Windows output to a log file using the $TRANSCRIPT_LOG_FILE assignment setting.

Note: After compiling components and application shells in the Uniface IDE, you can click ProcScript errors or warnings in the Compiler Output tab to navigate directly to the location that caused the message. The applicable editor is automatically opened.

Compiled Runtime Objects

For main development objects, compilation generates runtime objects, which are located in the UnifaceUserData/project/resources directory. You can configure a different location using the $RESOURCES_OUTPUT assignment setting.

Note:  If you change the $RESOURCES_OUTPUT location, you should also ensure that this location is listed in the [RESOURCES] section of the test environment assignment files (userver.asn and wasv.asn).

For objects such as modeled entities, modeled components, palettes, and templates, the compilation process checks the syntax of ProcScript that the objects may contain, but it does not generate runtime objects.

Configuring Compilation

You can influence the amount of information generated by compilation and configure the severity level for some types of messages by changing compilation settings. The following table shows equivalent compilation options available as assignment settings, command line sub-switches, and for ProcScript $ude("compile "). Command line switches and ProcScript options take precedence over assignment settings.

Compilation Settings
Assignment Setting Command Line Sub-Switch $ude("compile ") option Description
$GENERATE_CMI /cmi generatecmi Enable or disable generation of compiled module information for components when compiling from the command line.
$INCLUDE_NOT_FOUND_LEVEL /ilv includenotfoundlevel Set the severity of the compiler message 1000 - (Preprocessor) #INCLUDE IncludeName Not Found
N/A /iap includeallpurposes

Specify whether to compile all development objects, regardless of their purpose (Normal, Palettes, and Templates).

$LISTING_LEVEL /lis listinglevel Generate a script listing with or without precompiler directives.
$MESSAGE_LEVEL /inf

/war

messagelevel Specify whether to display information and warning messages, in addition to error messages (which are always displayed).
$NO_DEBUG /nodebug executeonly

Compile the application shell or component so that it cannot be debugged.

$SYMBOL_TABLE /sym symboltable Specify whether object references are generated during compilation, and where they are located.